MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / Trim

Function Trim

include/LightGBM/utils/common.h:40–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40inline static std::string Trim(std::string str) {
41 if (str.empty()) {
42 return str;
43 }
44 str.erase(str.find_last_not_of(" \f\n\r\t\v") + 1);
45 str.erase(0, str.find_first_not_of(" \f\n\r\t\v"));
46 return str;
47}
48
49inline static std::string RemoveQuotationSymbol(std::string str) {
50 if (str.empty()) {

Callers 15

ParseMachineListMethod · 0.50
KV2MapMethod · 0.50
Str2MapMethod · 0.50
SetFloatFieldMethod · 0.50
SetDoubleFieldMethod · 0.50
SetIntFieldMethod · 0.50
GetFloatFieldMethod · 0.50
GetDoubleFieldMethod · 0.50
GetIntFieldMethod · 0.50
GetInt8FieldMethod · 0.50
GetLabelIdxForLibsvmFunction · 0.50
GetLabelIdxForTSVFunction · 0.50

Calls 2

emptyMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected