summaryrefslogtreecommitdiff
path: root/src/user/lib/fwik/include/String.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/lib/fwik/include/String.h')
-rw-r--r--src/user/lib/fwik/include/String.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/user/lib/fwik/include/String.h b/src/user/lib/fwik/include/String.h
index 672220d..59fa0b6 100644
--- a/src/user/lib/fwik/include/String.h
+++ b/src/user/lib/fwik/include/String.h
@@ -11,30 +11,32 @@ class String {
public:
String();
String(const String& other);
- String(char* ptr);
- String(char* ptr, int len);
+ String(const char* ptr);
+ String(const char* ptr, int len);
String(char c, int count);
~String();
void operator=(const String &string);
- void operator=(char* ptr);
+ void operator=(const char* ptr);
- char* c_str();
+ const char* c_str() const;
- bool operator==(const String& other);
- bool operator==(char* other);
- bool operator<(const String& other);
+ bool operator==(const String& other) const;
+ bool operator==(const char* other) const;
+ bool operator<(const String& other) const;
char &operator[](int pos);
+ char operator[](int pos) const;
- int size() { return len; }
- operator bool() { return len != 0; }
- String substr(int start, int count);
+ int size() const { return len; }
+ operator bool() const { return len != 0; }
+ String substr(int start, int count) const;
- String operator+(const String& other);
+ String operator+(const String& other) const;
void operator+=(const String& other);
void operator+=(char c);
static String dec(int i);
static String hex(uint32_t v);
+ static String sprintf(const char* format, ...);
};
#endif