]> git.lyx.org Git - lyx.git/blobdiff - src/support/lstrings.C
the runlatex merge
[lyx.git] / src / support / lstrings.C
index 18f452dcb8805b97d15d4edb5838efaa30190a95..eb98f513d803a406ecbdf4e0d83d061e6d8147fe 100644 (file)
@@ -29,7 +29,7 @@ bool isStrInt(string const & str)
 }
 
 
-int  LStr2Int(string const & str)
+int  strToInt(string const & str)
 {
        string tmpstr;
 
@@ -86,7 +86,7 @@ string tostr(unsigned int ui)
 
 string tostr(char c)
 {
-  return tostr(long(c));
+       return string(1, c);
 }
 
 string tostr(bool b)
@@ -313,7 +313,7 @@ string strip(string const & a, char const c)
        if (i != string::npos) 
                tmp.erase(i + 1, string::npos);
        else
-               tmp.erase(); // only c in the whole string
+               tmp.clear(); // only c in the whole string
        return tmp;
 }
 
@@ -350,7 +350,7 @@ string split(string const & a, string & piece, char delim)
                piece = a.substr(0, i);
                tmp = a.substr(i + 1);
        } else if (i == 0) {
-               piece.erase();
+               piece.clear();
                tmp = a.substr(i + 1);
        } else {
                piece = a;
@@ -378,7 +378,7 @@ string rsplit(string const & a, string & piece, char delim)
                piece = a.substr(0, i);
                tmp = a.substr(i + 1);
        } else { // delimter was not found
-               piece.erase();
+               piece.clear();
        }
        return tmp;
 }