MCPcopy Create free account
hub / github.com/Tencent/libpag / LastIsSpace

Function LastIsSpace

exporter/src/utils/StringHelper.cpp:47–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47bool LastIsSpace(const std::string& text) {
48 if (text.empty()) {
49 return false;
50 }
51 char last = text.back();
52 return last == ' ' || last == '\n' || last == '\t' || last == '\r' || last == '\v' ||
53 last == '\f';
54}
55
56std::string DeleteLastSpace(const std::string& text) {
57 std::string result = text;

Callers 1

DeleteLastSpaceFunction · 0.85

Calls 1

emptyMethod · 0.80

Tested by

no test coverage detected