MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / replace

Method replace

source/util/bstring.cpp:452–460  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

450}
451
452BString BString::replace(char oldChar, char newChar) {
453 makeWritable(0);
454 for (int i = 0; i < data->len; i++) {
455 if (data->str[i] == oldChar) {
456 data->str[i] = newChar;
457 }
458 }
459 return *this;
460}
461
462BString BString::replace(const char* oldString, const char* newString) {
463 if (isEmpty()) {

Callers 15

parseParamMethod · 0.80
common.jsFile · 0.80
write_controllersFunction · 0.80
runMethod · 0.80
newInstFromGroupMethod · 0.80
trimLeftMethod · 0.80
trimRightMethod · 0.80
loadMethod · 0.80
_assignOperandsMethod · 0.80
toStringMethod · 0.80
toStringMethod · 0.80
_assignOperandsMethod · 0.80

Calls 2

memcpyFunction · 0.85
c_strMethod · 0.45

Tested by

no test coverage detected