diff --git a/src/kits/support/String.cpp b/src/kits/support/String.cpp index 18d3f78ae8..8c5f390000 100644 --- a/src/kits/support/String.cpp +++ b/src/kits/support/String.cpp @@ -1107,7 +1107,15 @@ BString::ReplaceSet(const char *setOfChars, char with) BString& BString::ReplaceSet(const char *setOfChars, const char *with) { - //TODO: Implement + if (with == NULL) + return *this; //TODO: do something smart + + int32 pos; + int32 withLen = strlen(with); + while ((pos = strcspn(String(), setofChars)) < Length()) { + _OpenAtBy(pos, withLen - 1); + memcpy(_privateData + pos, with, withLen); + } return *this; }