Lines Matching refs:string
92 const std::string EMPTY_STRING = "";
99 const char *HoldStringView(const std::string& view) in HoldStringView()
129 std::unordered_set<std::string> stringSet_{STRING_POOL_SIZE};
133 std::string StringReplace(std::string source, const std::string &from, const std::string &to);
136 std::string VectorToString(const std::vector<T> &items) in VectorToString()
138 if constexpr (std::is_same<T, std::vector<std::string>>::value) { in VectorToString()
139 std::vector<std::string> stringItems; in VectorToString()
145 std::string itemsString; in VectorToString()
146 const std::string split = ","; in VectorToString()
150 if constexpr (std::is_same<T, std::string>::value) { in VectorToString()
162 std::string BufferToHexString(const std::vector<unsigned char> &vec);
163 std::string BufferToHexString(const unsigned char buf[], size_t size);
166 std::string &StringTrim(std::string &s);
168 std::vector<std::string> StringSplit(std::string source, std::string split = ",");
170 size_t SubStringCount(const std::string &source, const std::string &sub);
172 bool StringStartsWith(const std::string &string, const std::string &with);
174 bool StringEndsWith(const std::string &string, const std::string &with);
176 bool IsSameCommand(std::string cmdLine, std::string cmdName);
180 bool IsDigits(const std::string &str);
182 bool IsHexDigits(const std::string &str);
186 bool CompressFile(const std::string &dataFile, const std::string &destFile);
188 bool UncompressFile(const std::string &gzipFile, const std::string &dataFile);
191 std::string StringPrintf(const char *stringFormat, VA... args) in StringPrintf()
207 return std::string(bytes); in StringPrintf()
211 std::vector<std::string> GetEntriesInDir(const std::string &basePath);
213 std::vector<std::string> GetSubDirs(const std::string &basePath);
215 bool IsDir(const std::string &path);
217 bool IsPath(const std::string &fileName);
224 const std::string PATH_SEPARATOR_STR = std::string(1, PATH_SEPARATOR);
226 std::string PlatformPathConvert(const std::string &path);
240 std::string ToHex(const T &source, int size = sizeof(T), bool perfix = false)
265 bool ReadIntFromProcFile(const std::string &path, int &value);
266 bool WriteIntToProcFile(const std::string &path, int value);
267 std::string ReadFileToString(const std::string &fileName);
268 bool ReadFileToString(const std::string &fileName, std::string &content, size_t fileSize = 0);
269 bool WriteStringToFile(const std::string &fileName, const std::string &value);
278 StdoutRecord(const std::string &tempFile = EMPTY_STRING,
279 const std::string &mode = EMPTY_STRING);
282 std::string Stop();
288 std::string content_ = EMPTY_STRING;
317 int32_t GetProcessPid(const std::string& processName);