We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 087c4a8 commit aac6f0aCopy full SHA for aac6f0a
src/FixedString.h
@@ -213,6 +213,31 @@ class FixedStringBase
213
return memcmp((char*)c_str(), other, otherLength) == 0;
214
}
215
216
+ void replace(char toReplace, char replaceWith)
217
+ {
218
+ for(size_t i =0; i < length(); i++)
219
220
+ if(_str()[i] == toReplace)
221
222
+ _str()[i] = replaceWith;
223
+ }
224
225
226
+ void trimStart(char c)
227
228
+ size_t charactersToTrim = 0;
229
+ while(charactersToTrim < length() && c_str()[charactersToTrim] == c)
230
231
+ charactersToTrim++;
232
233
234
235
+ _str()[i] = _str()[i+charactersToTrim];
236
237
+ _length -= charactersToTrim;
238
+ _str()[length()] = 0;
239
240
+
241
void appendFormat(const char *format, ...)
242
{
243
va_list argptr;
0 commit comments