bool TrackerString::Contains(const char* string, bool caseSensitivity) const { if (caseSensitivity) return FindFirst(string) > -1; else return IFindFirst(string) > -1; }
bool TrackerString::StartsWith(const char* string, bool caseSensitivity) const { if (caseSensitivity) return FindFirst(string) == 0; else return IFindFirst(string) == 0; }
BString& BString::IReplaceFirst(const char* replaceThis, const char* withThis) { if (!replaceThis || !withThis || IFindFirst(replaceThis) < 0) return *this; if (_MakeWritable() != B_OK) return *this; return _DoReplace(replaceThis, withThis, 1, 0, IGNORE_CASE); }
BString& BString::IReplaceAll(const char* replaceThis, const char* withThis, int32 fromOffset) { if (!replaceThis || !withThis || IFindFirst(replaceThis) < 0) return *this; if (_MakeWritable() != B_OK) return *this; return _DoReplace(replaceThis, withThis, REPLACE_ALL, min_clamp0(fromOffset, Length()), IGNORE_CASE); }
int32 TrackerString::IFindFirst(const BString &string, int32 fromOffset) const { return IFindFirst(string.String(), fromOffset); }
int32 TrackerString::IFindFirst(const char* string) const { return IFindFirst(string, 0); }
int32 TrackerString::IFindFirst(const BString &string) const { return IFindFirst(string.String(), 0); }