MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / trimEnd

Method trimEnd

source/core/StarString.cpp:443–451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

441}
442
443String String::trimEnd(String const& pattern) const {
444 size_t end;
445 for (end = size(); end > 0; --end) {
446 Char ec = (*this)[end - 1];
447 if (!pattern.hasCharOrWhitespace(ec))
448 break;
449 }
450 return substr(0, end);
451}
452
453String String::trimBeg(String const& pattern) const {
454 size_t beg;

Callers 4

unixFileJoinFunction · 0.80
parseAssetSourceFunction · 0.80
relativeToMethod · 0.80
isDirectoryMethod · 0.80

Calls 2

sizeFunction · 0.85
hasCharOrWhitespaceMethod · 0.45

Tested by

no test coverage detected