]> git.donarmstrong.com Git - lilypond.git/blob - flower/lib/include/string-convert.hh
release: 0.0.41
[lilypond.git] / flower / lib / include / string-convert.hh
1 /*
2   PROJECT: FlowerSoft C++ library
3   FILE   : string-convert.hh
4
5 */
6
7 #ifndef STRING_CONVERT_HH
8 #define STRING_CONVERT_HH
9
10 /*
11   ///a class which only has functions.
12 //#define functor class // cute. docxx fucks up
13 */
14
15 /**
16         The functor String_convert handles all conversions to/from String (some 
17         time, anyway).
18         The class is quite empty from data view.
19   */
20 class String_convert {
21     static int hex2bin_i( String hex_str, String& bin_str_r );
22     static int hex2nibble_i( Byte byte );
23     static Byte nibble2hex_byte( Byte byte );
24 public:
25     static String bin2dec_str( String bin_str );
26     static String bin2hex_str( String bin_str );
27     static String dec2bin_str( String str );
28     static int bin2_i( String str );
29     static String char_str(char c, int n);
30     static int dec2_i( String dec_str );
31     static double dec2_f( String dec_str );
32     static String double_str(double f, char const* fmt=0);
33     static int hex2int_i( String str );
34     static String hex2bin_str( String str );
35     static String int_str(int i, char const *fmt=0  );
36     static String i2hex_str( int i, int length_i, char ch );
37     static String i2dec_str( int i, int length_i, char ch );
38     static String rational_str(Rational);
39     static String pointer_str(const void *);
40     static String longlong_str(long long , char const * fmt = 0);
41 };
42
43 #endif // __STRING_CONVERT_HH //