Support find plugin to load
This commit is contained in:
@@ -65,6 +65,13 @@ bool starts_with(const std::string &text, const std::string &prefix) {
|
||||
return text.compare(0, prefix.length(), prefix) == 0;
|
||||
}
|
||||
|
||||
bool ends_with(const std::string &text, const std::string &suffix) {
|
||||
if (suffix.length() > text.length())
|
||||
return false;
|
||||
return text.compare(
|
||||
text.length() - suffix.length(), suffix.length(), suffix) == 0;
|
||||
}
|
||||
|
||||
std::vector<std::string> split(
|
||||
const std::string &text, const std::string &delimiters) {
|
||||
std::vector<std::string> tokens;
|
||||
|
||||
@@ -41,6 +41,9 @@ int hex2int(const std::string &text);
|
||||
MYNTEYE_API
|
||||
bool starts_with(const std::string &text, const std::string &prefix);
|
||||
|
||||
MYNTEYE_API
|
||||
bool ends_with(const std::string &text, const std::string &suffix);
|
||||
|
||||
MYNTEYE_API
|
||||
std::vector<std::string> split(
|
||||
const std::string &text, const std::string &delimiters);
|
||||
|
||||
Reference in New Issue
Block a user