// // Copyright 2015 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // string_utils: // String helper functions. //
// Return the substring starting at offset and up to the first occurance of the |delimeter|.
std::string GetPrefix(const std::string &input, size_t offset, constchar *delimiter);
std::string GetPrefix(const std::string &input, size_t offset, char delimiter);
// Check if the string str begins with the given prefix. // The comparison is case sensitive. bool BeginsWith(const std::string &str, const std::string &prefix);
// Check if the string str begins with the given prefix. // Prefix may not be NULL and needs to be NULL terminated. // The comparison is case sensitive. bool BeginsWith(const std::string &str, constchar *prefix);
// Check if the string str begins with the given prefix. // str and prefix may not be NULL and need to be NULL terminated. // The comparison is case sensitive. bool BeginsWith(constchar *str, constchar *prefix);
// Check if the string str begins with the first prefixLength characters of the given prefix. // The length of the prefix string should be greater than or equal to prefixLength. // The comparison is case sensitive. bool BeginsWith(const std::string &str, const std::string &prefix, const size_t prefixLength);
// Check if the string str ends with the given suffix. // The comparison is case sensitive. bool EndsWith(const std::string &str, const std::string &suffix);
// Check if the string str ends with the given suffix. // Suffix may not be NULL and needs to be NULL terminated. // The comparison is case sensitive. bool EndsWith(const std::string &str, constchar *suffix);
// Check if the string str ends with the given suffix. // str and suffix may not be NULL and need to be NULL terminated. // The comparison is case sensitive. bool EndsWith(constchar *str, constchar *suffix);
// Check if the given token string contains the given token. // The tokens are separated by the given delimiter. // The comparison is case sensitive. bool ContainsToken(const std::string &tokenStr, char delimiter, const std::string &token);
// Convert to lower-case. void ToLower(std::string *str);
// Convert to upper-case. void ToUpper(std::string *str);
// Replaces the substring 'substring' in 'str' with 'replacement'. Returns true if successful. bool ReplaceSubstring(std::string *str, const std::string &substring, const std::string &replacement);
// Replaces all substrings 'substring' in 'str' with 'replacement'. Returns count of replacements. int ReplaceAllSubstrings(std::string *str, const std::string &substring, const std::string &replacement);
// Takes a snake_case string and turns it into camelCase.
std::string ToCamelCase(const std::string &str);
// Split up a string parsed from an environment variable.
std::vector<std::string> GetStringsFromEnvironmentVarOrAndroidProperty(constchar *varName, constchar *propertyName, constchar *separator);
// Split up a string parsed from environment variable or via Android property, use cached result if // available.
std::vector<std::string> GetCachedStringsFromEnvironmentVarOrAndroidProperty( constchar *varName, constchar *propertyName, constchar *separator);
// glob can have * as wildcard bool NamesMatchWithWildcard(constchar *glob, constchar *name);
} // namespace angle
#endif// LIBANGLE_STRING_UTILS_H_
Messung V0.5
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.