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

Method toUpperCase

source/util/bstring.cpp:620–637  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

618}
619
620BString BString::toUpperCase() const {
621 if (isEmpty()) {
622 return *this;
623 }
624
625 BStringData* d = allocNewData();
626 d->level = getLevel();
627 d->str = getNewString(d->level);
628 d->len = length();
629 d->incRefCount();
630
631 std::locale loc;
632 for (int i = 0; i < d->len; i++) {
633 d->str[i] = std::toupper(data->str[i], loc);
634 }
635 d->str[d->len] = 0;
636 return BString(d);
637}
638
639void BString::resize(U32 len) {
640 makeWritable(len);

Callers 15

mul8internalMethod · 0.80
mul16internalMethod · 0.80
mul32internalMethod · 0.80
arithDynRRMethod · 0.80
arithDynERMethod · 0.80
arithDynREMethod · 0.80
arithDynRIMethod · 0.80
arithDynEIMethod · 0.80
arith32Method · 0.80
arith16Method · 0.80
arith8Method · 0.80
arithSingle32Method · 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