MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / trim

Function trim

src/runtime.cpp:97–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97static inline std::string trim(std::string s)
98{
99 // trim right
100 s.erase(std::find_if(s.rbegin(), s.rend(), [](int ch) { return !is_whitespace(ch); }).base(), s.end());
101 // trim left
102 s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int ch) { return !is_whitespace(ch); }));
103 return s;
104}
105
106static size_t write_header(char* ptr, size_t size, size_t nmemb, void* userdata)
107{

Callers 1

write_headerFunction · 0.85

Calls 3

is_whitespaceFunction · 0.85
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected