add StripCrnl
This commit is contained in:
@@ -601,6 +601,12 @@ void TrimRight(CString &str, const char *s)
|
||||
str.erase(str.begin()+n, str.end());
|
||||
}
|
||||
|
||||
void StripCrnl(CString &s)
|
||||
{
|
||||
while(s[s.size()-1] == '\r' || s[s.size()-1] == '\n')
|
||||
s.erase(s.size()-1);
|
||||
}
|
||||
|
||||
/* path is a .redir pathname. Read it and return the real one. */
|
||||
CString DerefRedir(const CString &path)
|
||||
{
|
||||
|
||||
@@ -193,6 +193,7 @@ float calc_stddev(const float *start, const float *end);
|
||||
|
||||
void TrimLeft(CString &str, const char *s = "\r\n\t ");
|
||||
void TrimRight(CString &str, const char *s = "\r\n\t ");
|
||||
void StripCrnl(CString &s);
|
||||
|
||||
CString DerefRedir(const CString &path);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user