mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-11-21 16:37:20 +01:00
Added more helper methods to StringBuilder.
This commit is contained in:
parent
c0d74c2060
commit
eebeadbe47
@ -57,6 +57,13 @@ StringBuilder &StringBuilder::append(const char *p_cstring) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
void StringBuilder::clear() {
|
||||
string_length = 0;
|
||||
strings.clear();
|
||||
c_strings.clear();
|
||||
appended_strings.clear();
|
||||
}
|
||||
|
||||
String StringBuilder::as_string() const {
|
||||
if (string_length == 0) {
|
||||
return "";
|
||||
|
@ -50,6 +50,12 @@ public:
|
||||
StringBuilder &append(const String &p_string);
|
||||
StringBuilder &append(const char *p_cstring);
|
||||
|
||||
void clear();
|
||||
|
||||
_FORCE_INLINE_ uint32_t length() {
|
||||
return string_length;
|
||||
}
|
||||
|
||||
_FORCE_INLINE_ StringBuilder &operator+(const String &p_string) {
|
||||
return append(p_string);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user