]> git.lyx.org Git - lyx.git/blobdiff - src/support/lstrings.h
small changes read ChangeLog
[lyx.git] / src / support / lstrings.h
index b76e6137b73cd38afcd00aa837389043037f8e3f..9650f2d2206d4d0490e87c432c30712b9b3caf29 100644 (file)
@@ -8,12 +8,15 @@
 #ifndef LSTRINGS_H
 #define LSTRINGS_H
 
+#ifdef __GNUG__
+#pragma interface
+#endif
+
 #include <cstring>
 #include <cctype>
 
 #ifdef HAVE_SSTREAM
 #include <sstream>
-using std::ostringstream;
 #else
 #include <strstream>
 #endif
@@ -27,15 +30,17 @@ int compare_no_case(string const & s, string const & s2);
 ///
 int compare_no_case(string const & s, string const & s2, unsigned int len);
 
-///
-inline int compare(char const * a, char const * b)
+
+inline
+int compare(char const * a, char const * b)
 {
        return strcmp(a, b);
 }
 
 
-///
-inline int compare(char const * a, char const * b, unsigned int len)
+
+inline
+int compare(char const * a, char const * b, unsigned int len)
 {
        return strncmp(a, b, len);
 }
@@ -47,18 +52,31 @@ bool isStrInt(string const & str);
 ///
 int strToInt(string const & str);
 
+///
+bool isStrDbl(string const & str);
+
+///
+double strToDbl(string const & str);
+
+/// 
+char lowercase(char c);
+
+/// 
+char uppercase(char c);
+
 ///
 string lowercase(string const &);
 
 ///
 string uppercase(string const &);
 
-/// convert T to string
+// convert T to string
 template<typename T>
-inline string tostr(T const & t) 
+inline
+string tostr(T const & t) 
 {
 #ifdef HAVE_SSTREAM
-       ostringstream ostr;
+       std::ostringstream ostr;
        ostr << t;
        return ostr.str().c_str();
        // We need to use the .c_str since we sometimes are using
@@ -103,6 +121,18 @@ bool contains(string const & a, string const & b);
 ///
 bool contains(char const * a, char const * b);
 
+///
+bool containsOnly(string const &, char const *);
+
+///
+bool containsOnly(string const &, string const &);
+
+///
+bool containsOnly(char const *, char const *);
+
+///
+bool containsOnly(char const *, string const &);
+
 /// Counts how many of character c there is in a
 unsigned int countChar(string const & a, char const c);