Lines Matching refs:string
38 std::string tmpPath(filePath);
39 std::string tmpContent(content);
49 std::string tmpContent(content);
59 std::string tmpPath(filePath);
70 std::string tmpPath(filePath);
77 std::string tmpPath(filePath);
78 std::string tmpContent(content);
84 std::string tmpContent(content);
90 std::string tmpName(fileName);
96 std::string tmpName(fileName);
97 std::string tmpStr(subStr);
103 std::string tmpName(fileName);
104 std::string tmpStr(subStr);
110 bool LoadStringFromFile(const string& filePath, string& content)
131 string GetFileNameByFd(const int fd)
134 return string();
137 string fdPath = "/proc/self/fd/" + std::to_string(fd);
143 return string();
146 return string(fileName);
149 bool LoadStringFromFdToFile(int fd, string& content)
151 string fileName = GetFileNameByFd(fd);
158 UTILS_LOGE("LoadStringFromFd get string from file failed!");
164 bool LoadStringFromFd(int fd, string& content)
203 bool SaveStringToFile(const std::string& filePath, const std::string& content, bool truncated /*= true*/)
231 bool SaveStringToFd(int fd, const std::string& content)
258 bool LoadBufferFromNodeFile(const string& filePath, vector<char>& content)
260 string realPath;
294 bool LoadBufferFromFile(const string& filePath, vector<char>& content)
331 bool SaveBufferToFile(const string& filePath, const vector<char>& content, bool truncated /*= true*/)
352 bool FileExists(const string& fileName)
357 bool StringExistsInFile(const string& fileName, const string& subStr, bool caseSensitive /*= true*/)
364 string str;
371 return (str.find(subStr) != string::npos);
374 string strlower(str);
375 string sublower(subStr);
378 return (strlower.find(sublower) != string::npos);
381 int CountStrInStr(const string& str, const string& subStr)
391 while ((position = str.find(subStr, position)) != string::npos) {
399 int CountStrInFile(const string& fileName, const string& subStr, bool caseSensitive /*= true*/)
406 string str;
417 string strlower(str);
418 string sublower(subStr);