MCPcopy Create free account
hub / github.com/CesiumGS/cesium-native / trimSpace

Function trimSpace

CesiumAsync/src/ResponseCacheControl.cpp:13–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11namespace CesiumAsync {
12namespace {
13std::string trimSpace(const std::string& str) {
14 if (str.empty()) {
15 return "";
16 }
17
18 size_t begin = 0;
19 while (str[begin] == ' ') {
20 ++begin;
21 }
22
23 size_t end = str.size() - 1;
24 while (str[end] == ' ') {
25 --end;
26 }
27
28 return str.substr(begin, end - begin + 1);
29}
30} // namespace
31
32ResponseCacheControl::ResponseCacheControl(

Callers 1

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected