MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / trim

Function trim

src/models/stable_audio/request.cpp:16–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14namespace {
15
16std::string trim(std::string value) {
17 auto is_space = [](unsigned char ch) { return std::isspace(ch) != 0; };
18 value.erase(value.begin(), std::find_if(value.begin(), value.end(), [&](char ch) { return !is_space(static_cast<unsigned char>(ch)); }));
19 value.erase(std::find_if(value.rbegin(), value.rend(), [&](char ch) { return !is_space(static_cast<unsigned char>(ch)); }).base(), value.end());
20 return value;
21}
22
23std::vector<std::string> split_pipe(const std::string & value) {
24 std::vector<std::string> out;

Callers 2

split_pipeFunction · 0.70
split_float_listFunction · 0.70

Calls 3

eraseMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected