MCPcopy Create free account
hub / github.com/antvis/F2Native / BeginWithString

Method BeginWithString

core/utils/StringUtil.h:53–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 }
52
53 static bool BeginWithString(const std::string &color,
54 const std::string &compareStr) {
55 if (color.empty() || compareStr.empty()) {
56 return false;
57 }
58 if (color.length() < compareStr.length()) {
59 return false;
60 }
61 if (color.compare(0, compareStr.length(), compareStr) == 0) {
62 return true;
63 }
64 return false;
65 }
66
67 static std::string Trim(const std::string &str, const char *whitespace = nullptr, bool trimStart = true, bool trimEnd = true) {
68 if(str.empty()) {

Callers

nothing calls this directly

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected