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

Method toLowerCase

source/util/bstring.cpp:601–618  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

599}
600
601BString BString::toLowerCase() const {
602 if (isEmpty()) {
603 return *this;
604 }
605 // can't just copy len and level, they might not be set yet for literals
606 BStringData* d = allocNewData();
607 d->level = getLevel();
608 d->str = getNewString(d->level);
609 d->len = length();
610 d->incRefCount();
611
612 std::locale loc;
613 for (int i = 0; i < d->len; i++) {
614 d->str[i] = std::tolower(data->str[i], loc);
615 }
616 d->str[d->len] = 0;
617 return BString(d);
618}
619
620BString BString::toUpperCase() const {
621 if (isEmpty()) {

Callers 13

afterMethod · 0.80
buildAppFileSystemFunction · 0.80
readFileFunction · 0.80
common.jsFile · 0.80
parseMethod · 0.80
runMethod · 0.80
camelCaseMethod · 0.80
parseMethod · 0.80
_assignOperandsMethod · 0.80
_assignOperandsMethod · 0.80
applyMethod · 0.80
findAppsMethod · 0.80

Calls 5

allocNewDataFunction · 0.85
getNewStringFunction · 0.85
lengthFunction · 0.85
BStringClass · 0.85
incRefCountMethod · 0.80

Tested by

no test coverage detected