add StripCrnl

This commit is contained in:
Glenn Maynard
2003-02-14 22:28:29 +00:00
parent ca801199c3
commit 19aecdfcdc
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -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)
{
+1
View File
@@ -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);