]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/string.cc
release: 0.0.10
[lilypond.git] / flower / string.cc
index 2e8e8bf5c6f33e5f7849fefaf4a1a70c2faee518..9c6792c0217cb86d523e4aa68ba82f077ec63b3b 100644 (file)
 #include <stdio.h>
 #include <ctype.h>
 #include <assert.h>
-//#include "globals.hh"
+
 #include "string.hh"
 
+
 static char* strlwr( char* s )
 {
     char* p = s;
@@ -108,41 +109,14 @@ String::String( const int i, const int n, const char c )
     // String convd to const char *
 }
 
- const char*
-String::ptr() const
+const char*
+String::cptr() const
 {
     return data;
 }
 
 
 
-#ifdef CENTRAL_OBJECT // everything derived from Sortable object
-// comparisons.
-int
-String::operator ==( const Sortable& test ) const
-{
-    const String *s = (const String *) &test; 
-    return *this == *s;
-}
-
-int
-String::operator &&(const Object& test) const
-{
-    const String *s = (const String *) &test;
-    
-    int i = min( len(), s->len() );
-    return ( i > 0 ) ?
-        ( !strncmp( data, s->data, i ) ) : 0;
-}
-
-int
-String::operator >( const Sortable& test ) const
-{
-    const String *s = (const String *) &test;
-    return strcmp( data, s->data ) > 0;
-}
-#endif
-
 // signed comparison,  analogous to strcmp;
 int
 String::compare( const char* test ) const
@@ -386,16 +360,3 @@ String::reversed() const
     strrev(s);
     return retval;    
 }
-bool
-String::to_bool() const
-{
-    if (!len())
-       return false;
-    if (*this == "0")
-       return false;
-    String u (*this);
-    u.upper();
-    if (u== "FALSE")
-       return false;
-    return true;
-}