54 void append(char character); |
54 void append(char character); |
55 void append(const String& text); |
55 void append(const String& text); |
56 ConstIterator begin() const; |
56 ConstIterator begin() const; |
57 Iterator begin(); |
57 Iterator begin(); |
58 int compare(const String &other) const; |
58 int compare(const String &other) const; |
59 int count(char needle) const; |
59 int count(char character) const; |
60 const char* chars() const; |
60 const char* chars() const; |
61 void clear(); |
61 void clear(); |
62 ConstIterator end() const; |
62 ConstIterator end() const; |
63 Iterator end(); |
63 Iterator end(); |
64 bool endsWith(const String &other) const; |
64 bool endsWith(const String &other) const; |
65 int find(const char* c, int a = 0) const; |
65 int find(const char* subString, int startingPosition = 0) const; |
66 int find(char ch, int a = 0) const; |
66 int find(char character, int startingPosition = 0) const; |
67 int indexDifference(int a, int b); |
67 int indexDifference(int a, int b); |
68 void insert(int position, char character); |
68 void insert(int position, char character); |
69 void insert(int position, const char* string); |
69 void insert(int position, const char* string); |
70 bool isEmpty() const; |
70 bool isEmpty() const; |
71 bool isNumeric() const; |
71 bool isNumeric() const; |
72 void modifyIndex(int &a) const; |
72 void modifyIndex(int &a) const; |
73 int findLast(const char*c, int a) const; |
73 int findLast(const char* subString, int startingPosition = -1) const; |
74 int length() const; |
74 int length() const; |
75 bool maskAgainst(const String &pattern) const; |
75 bool maskAgainst(const String &pattern) const; |
76 String md5() const; |
76 String md5() const; |
77 String mid(int a, int b) const; |
77 String mid(int rangeBegin, int rangeEnd) const; |
78 void normalize(int(*filter)(int) = &isspace); |
78 void normalize(int(*filter)(int) = &isspace); |
79 String normalized(int(*filter)(int) = &isspace) const; |
79 String normalized(int(*filter)(int) = &isspace) const; |
80 void prepend(String text); |
80 void prepend(String text); |
81 void remove(int position, int length); |
81 void remove(int position, int length); |
82 void removeAt(int position); |
82 void removeAt(int position); |
83 void removeFromEnd(int length); |
83 void removeFromEnd(int length); |
84 void removeFromStart(int length); |
84 void removeFromStart(int length); |
85 void replace(const char* a, const char* b); |
85 void replace(const char* text, const char* replacement); |
86 void replace(int position, int amount, const String &text); |
86 void replace(int position, int amount, const String &text); |
87 String right(int length) const; |
87 String right(int length) const; |
88 void shrinkToFit(); |
88 void shrinkToFit(); |
89 class StringList split(const String &del) const; |
89 class StringList split(const String &delimeter) const; |
90 class StringList split(char del) const; |
90 class StringList split(char delimeter) const; |
91 void __cdecl sprintf(const char* fmtstr, ...); |
91 void __cdecl sprintf(const char* fmtstr, ...); |
92 bool startsWith(const String &other) const; |
92 bool startsWith(const String &other) const; |
93 const std::string& stdString() const; |
93 const std::string& stdString() const; |
94 String strip(char unwanted) const; |
94 void strip(char unwanted); |
95 String strip(const List<char> &unwanted) const; |
95 void strip(const List<char> &unwanted); |
96 double toDouble(bool* ok = nullptr) const; |
96 double toDouble(bool* ok = nullptr) const; |
97 float toFloat(bool* ok = nullptr) const; |
97 float toFloat(bool* ok = nullptr) const; |
98 long toInt(bool* ok = nullptr, int base = 10) const; |
98 long toInt(bool* ok = nullptr, int base = 10) const; |
99 String toLowerCase() const; |
99 String toLowerCase() const; |
100 String toUpperCase() const; |
100 String toUpperCase() const; |
101 void trim(int n); |
|
102 void vsprintf(const char* fmtstr, va_list args); |
101 void vsprintf(const char* fmtstr, va_list args); |
103 |
102 |
104 static String fromNumber(short int a); |
103 static String fromNumber(short int a); |
105 static String fromNumber(int a); |
104 static String fromNumber(int a); |
106 static String fromNumber(long int a); |
105 static String fromNumber(long int a); |
554 } |
553 } |
555 |
554 |
556 /*! |
555 /*! |
557 * \brief Constructs an empty string list. |
556 * \brief Constructs an empty string list. |
558 */ |
557 */ |
559 StringList::StringList() {} |
558 inline StringList::StringList() {} |
560 |
559 |
561 /*! |
560 /*! |
562 * \brief Constructs a string list containing \c numvalues empty strings. |
561 * \brief Constructs a string list containing \c numvalues empty strings. |
563 * \param numvalues Amount of empty strings to fill. |
562 * \param numvalues Amount of empty strings to fill. |
564 */ |
563 */ |
565 StringList::StringList(int numvalues) : |
564 inline StringList::StringList(int numvalues) : |
566 List<String>(numvalues) {} |
565 List<String>(numvalues) {} |
567 |
566 |
568 /*! |
567 /*! |
569 * \brief Constructs a string list from another list of strings. |
568 * \brief Constructs a string list from another list of strings. |
570 * \param other The list of strings to use for construction. |
569 * \param other The list of strings to use for construction. |
571 */ |
570 */ |
572 StringList::StringList(const List<String>& other) : |
571 inline StringList::StringList(const List<String>& other) : |
573 List<String>(other) {} |
572 List<String>(other) {} |
574 |
573 |
575 /*! |
574 /*! |
576 * \brief An \c operator== implementation that allows a char-array to be at the left side of a string comparison |
575 * \brief An \c operator== implementation that allows a char-array to be at the left side of a string comparison |
577 * with a \c String. |
576 * with a \c String. |