#include "common/string_utils.h"
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <cctype>
#include <fstream>
#include <sstream>
#include "common/platform.h"
#include "common/system_utils.h"
namespace
{
bool EndsWithSuffix(const char *str,
const size_t strLen,
const char *suffix,
const size_t suffixLen)
{ … }
}
namespace angle
{
const char kWhitespaceASCII[] = …;
std::vector<std::string> SplitString(const std::string &input,
const std::string &delimiters,
WhitespaceHandling whitespace,
SplitResult resultType)
{ … }
void SplitStringAlongWhitespace(const std::string &input, std::vector<std::string> *tokensOut)
{ … }
std::string TrimString(const std::string &input, const std::string &trimChars)
{ … }
std::string GetPrefix(const std::string &input, size_t offset, const char *delimiter)
{ … }
std::string GetPrefix(const std::string &input, size_t offset, char delimiter)
{ … }
bool HexStringToUInt(const std::string &input, unsigned int *uintOut)
{ … }
bool ReadFileToString(const std::string &path, std::string *stringOut)
{ … }
bool BeginsWith(const std::string &str, const std::string &prefix)
{ … }
bool BeginsWith(const std::string &str, const char *prefix)
{ … }
bool BeginsWith(const char *str, const char *prefix)
{ … }
bool BeginsWith(const std::string &str, const std::string &prefix, const size_t prefixLength)
{ … }
bool EndsWith(const std::string &str, const std::string &suffix)
{ … }
bool EndsWith(const std::string &str, const char *suffix)
{ … }
bool EndsWith(const char *str, const char *suffix)
{ … }
bool ContainsToken(const std::string &tokenStr, char delimiter, const std::string &token)
{ … }
void ToLower(std::string *str)
{ … }
void ToUpper(std::string *str)
{ … }
bool ReplaceSubstring(std::string *str,
const std::string &substring,
const std::string &replacement)
{ … }
int ReplaceAllSubstrings(std::string *str,
const std::string &substring,
const std::string &replacement)
{ … }
std::string ToCamelCase(const std::string &str)
{ … }
std::vector<std::string> GetStringsFromEnvironmentVarOrAndroidProperty(const char *varName,
const char *propertyName,
const char *separator)
{ … }
std::vector<std::string> GetCachedStringsFromEnvironmentVarOrAndroidProperty(
const char *varName,
const char *propertyName,
const char *separator)
{ … }
bool NamesMatchWithWildcard(const char *glob, const char *name)
{ … }
}