]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/include/std-string.hh
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / flower / include / std-string.hh
index d623145479b01d71420dfce59cbc3b902b80b8df..bc2fd61ee5f75bd90ccbd02692b7514aa72ac006 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  std-string.hh -- declare Std_string
+  std-string.hh -- declare string
 
   source file of the GNU LilyPond music typesetter
 
@@ -8,52 +8,34 @@
 
 #ifndef STD_STRING_HH
 #define STD_STRING_HH
+#include "compare.hh"
 
-#if !STD_STRING
+#include <string>
 
-#define Std_string String
-#define to_std_string to_string
-class String;
-#include "string.hh"
+using namespace std;
+
+typedef size_t ssize;
+#define NPOS string::npos
+
+string to_string (string s);
+string to_string (char c, int n=1);
+string to_string (int i, char const *format=0);
+string to_string (double f, char const *format=0);
+string to_string (long);
+string to_string (long unsigned);
+string to_string (unsigned);
+string to_string (bool b);
+string to_string (char const *format, ...)
+  __attribute__ ((format (printf, 1, 2)));
+  
+string &replace_all (string &str, string find, string replace);
+string &replace_all (string &str, char find, char replace);
+char *string_copy (string s);
 
-#else
+int string_compare (string const &, string const &);
+
+INSTANTIATE_COMPARE (string const &, string_compare);
 
-#include <string>
-// #warning Using std::string
-
-namespace std {
-
-#if 0
-  class Std_string : public string
-  {
-  public:
-    Std_string ();
-    Std_string (char const*);
-    Std_string (Std_string const&, int pos, int n=npos);
-    ///Std_string (String const&, int pos, int n);
-    ////Std_string (String const &);
-    ////operator String ();
-  };
-#else  
-  typedef string Std_string;
-#endif
-
-  //operator Std_string (String const&);
-
-  Std_string to_std_string (Std_string s);
-  Std_string to_std_string (char c, int n = 1);
-  Std_string to_std_string (int i, char const *format = 0);
-  Std_string to_std_string (double f, char const *format = 0);
-  Std_string to_std_string (long b);
-  Std_string to_std_string (bool b);
-  Std_string to_std_string (char const *format, ...);
-
-#endif /* STD_STRING */
-
-  Std_string &replace_all (Std_string &str, Std_string find, Std_string replace);
-#if STD_STRING
-}
-#endif
-  
 
 #endif /* STD_STRING_HH */