]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/include/string-convert.hh
Imported Upstream version 2.19.45
[lilypond.git] / flower / include / string-convert.hh
index 1e9da716ef99671ff30a55d299aa49fab02e511a..8e1695bd5ceb9d6154fe3d3a5edc5f22e5595a6f 100644 (file)
@@ -9,43 +9,44 @@
 #include <cstdarg>
 using namespace std;
 
+#include "flower-proto.hh"
 #include "std-string.hh"
-#include "string.hh"
 
-/** The functor Std_string_convert handles all conversions to/from Std_string
+/** The functor string_convert handles all conversions to/from string
     (some time, anyway).  The class is quite empty from data view.  */
 class String_convert
 {
-  static int hex2bin (Std_string hex_string, Std_string &bin_string_r);
+  static int hex2bin (string hex_string, string &bin_string_r);
   static int hex2nibble (Byte byte);
   static Byte nibble2hex_byte (Byte byte);
 public:
-  static Std_string pad_to (Std_string s, int length);
-  static Std_string bool_string (bool b);
-  static Std_string bin2dec (Std_string bin_string);
-  static Std_string bin2hex (Std_string bin_string);
-  static Std_string dec2bin (Std_string str);
-  static int bin2int (Std_string bin_string);
-  static unsigned bin2unsigned (Std_string bin_string);
-  static Std_string char_string (char c, int n);
-  static int dec2int (Std_string dec_string);
-  static double dec2double (Std_string dec_string);
-  static Std_string double_string (double f, char const *fmt = 0);
-  static Std_string form_string (char const *format, ...);
-  static Std_string vform_string (char const *format, va_list args);
-  static int hex2int (Std_string str);
-  static unsigned hex2unsigned (Std_string str);
-  static Std_string hex2bin (Std_string str);
-  static Std_string int_string (int i, char const *fmt = 0);
-  static Std_string long_string (long);
-  static Std_string int2hex (int i, int length_i, char ch);
-  static Std_string unsigned2hex (unsigned u, ssize length, char ch);
-  static Std_string int2dec (int i, int length_i, char ch);
-  static Std_string rational_string (Rational);
-  static Std_string pointer_string (void const *);
-  static Std_string precision_string (double x, int n);
-  static Array<Std_string> split (Std_string str, char c);
-  static Std_string i64_string (I64, char const *fmt = 0);
+  static string pad_to (const string &s, size_t length);
+  static string bool_string (bool b);
+  static string bin2hex (Byte bin_char);
+  static string bin2hex (const string &bin_string);
+  static int bin2int (const string &bin_string);
+  static unsigned bin2unsigned (const string &bin_string);
+  static string char_string (char c, int n);
+  static int dec2int (const string &dec_string);
+  static double dec2double (const string &dec_string);
+  static string double_string (double f, char const *fmt = 0);
+  static string form_string (char const *format, ...) __attribute__ ((format (printf, 1, 2)));
+  static string vform_string (char const *format, va_list args);
+  static string hex2bin (const string &str);
+  static string int_string (int i, char const *fmt = 0);
+  static string unsigned_string (unsigned);
+  static string unsigned_long_string (unsigned long);
+  static string long_string (long);
+  static string int2hex (int i, size_t length_i, char ch);
+  static string unsigned2hex (unsigned u, size_t length, char ch);
+  static string int2dec (int i, size_t length_i, char ch);
+  static string rational_string (Rational);
+  static string pointer_string (void const *);
+  static string precision_string (double x, int n);
+  static string i64_string (I64, char const *fmt = 0);
+  static string to_lower (string s);
+  static string to_upper (string s);
+  static string reverse (string s);
 };
 
 #endif // __STRING_CONVERT_HH //