47 void clear(
bool destructing =
false);
48 Error set(
char const* newChars, int32_t newLength = -1);
49 void set(String
const* otherString);
52 Error shorten(int32_t newLength);
53 Error concatenateAtPos(
char const* newChars, int32_t pos, int32_t newCharsLength = -1);
54 Error concatenateInt(int32_t number, int32_t minNumDigits = 1);
55 Error setInt(int32_t number, int32_t minNumDigits = 1);
56 Error setChar(
char newChar, int32_t pos);
57 Error concatenate(String* otherString);
58 Error concatenate(
char const* newChars);
59 bool equals(
char const* otherChars);
60 bool equalsCaseIrrespective(
char const* otherChars);
62 inline bool contains(
const char* otherChars) {
return strstr(stringMemory, otherChars) != NULL; }
63 inline bool equals(String* otherString) {
64 if (stringMemory == otherString->stringMemory) {
67 if (!stringMemory || !otherString->stringMemory) {
70 return equals(otherString->get());
73 inline bool equalsCaseIrrespective(String* otherString) {
74 if (stringMemory == otherString->stringMemory) {
77 if (!stringMemory || !otherString->stringMemory) {
80 return equalsCaseIrrespective(otherString->get());
83 [[nodiscard]]
inline char const* get()
const {
90 inline bool isEmpty() {
return !stringMemory; }
93 int32_t getNumReasons();
94 void setNumReasons(int32_t newNum);
96 char* stringMemory =
nullptr;