MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / rtrim

Function rtrim

src/include/common/string_utils.h:52–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50 return input.substr(begin);
51 }
52 static std::string rtrim(const std::string& input) {
53 auto s = input;
54 s.erase(find_if(s.rbegin(), s.rend(), [](unsigned char ch) { return !isspace(ch); }).base(),
55 s.end());
56 return s;
57 }
58 static std::string_view rtrim(std::string_view input) {
59 auto end = input.size();
60 while (end > 0 && isSpace(input[end - 1])) {

Callers 11

checkLogicalPlanMethod · 0.85
generateOutputMethod · 0.85
TESTFunction · 0.85
inferMapOrStructFunction · 0.85
isBuiltInTypeMethod · 0.85
convertFromStringMethod · 0.85
parseDecimalTypeFunction · 0.85
trimMethod · 0.85
noProxyMatchesFunction · 0.85

Calls 4

isSpaceFunction · 0.85
eraseMethod · 0.80
endMethod · 0.45
sizeMethod · 0.45

Tested by 3

checkLogicalPlanMethod · 0.68
generateOutputMethod · 0.68
TESTFunction · 0.68