Lines Matching refs:str
58 string str; in Size2Str() local
72 str = to_string(size); in Size2Str()
74 str = buf; in Size2Str()
76 return str + g_SizeMap.GetKey(unit); in Size2Str()
79 uint64_t Str2Size(const string& str) in Str2Size() argument
82 if (!std::regex_match(str, reg)) { in Str2Size()
85 uint64_t index = str.size() - 1; in Str2Size()
86 uint64_t unit = g_SizeMap.GetValue(str[index]); in Str2Size()
88 uint64_t value = stoull(str.substr(0, unit !=0 ? index : index + 1)); in Str2Size()
160 uint16_t Str2LogType(const string& str) in Str2LogType() argument
162 return g_LogTypes.GetKey(str); in Str2LogType()
168 string str = ""; in ComboLogType2Str() local
178 str += (LogType2Str(t) + (shiftType != 0 ? "," : "")); in ComboLogType2Str()
184 return str; in ComboLogType2Str()
187 uint16_t Str2ComboLogType(const string& str) in Str2ComboLogType() argument
190 if (str == "") { in Str2ComboLogType()
195 Split(str, vec); in Str2ComboLogType()
233 uint16_t Str2LogLevel(const string& str) in Str2LogLevel() argument
235 return g_LogLevels.GetKey(str); in Str2LogLevel()
251 uint16_t ShortStr2LogLevel(const string& str) in ShortStr2LogLevel() argument
253 return g_ShortLogLevels.GetKey(str); in ShortStr2LogLevel()
256 uint16_t PrettyStr2LogLevel(const string& str) in PrettyStr2LogLevel() argument
258 uint16_t level = ShortStr2LogLevel(str); in PrettyStr2LogLevel()
260 return Str2LogLevel(str); in PrettyStr2LogLevel()
268 string str = ""; in ComboLogLevel2Str() local
278 str += (LogLevel2Str(l) + (shiftLevel != 0 ? "," : "")); in ComboLogLevel2Str()
284 return str; in ComboLogLevel2Str()
287 uint16_t Str2ComboLogLevel(const string& str) in Str2ComboLogLevel() argument
290 if (str == "") { in Str2ComboLogLevel()
295 Split(str, vec); in Str2ComboLogLevel()
311 std::string str = src; in Split() local
316 index = str.find_first_of(separator, start); in Split()
318 dest.emplace_back(str); in Split()
322 substring = str.substr(start, index - start); in Split()
325 index = str.find(separator, start); in Split()
327 substring = str.substr(start); in Split()
368 return ss.str(); in Num2Str()
372 static void Str2Num(const string& str, T& num, Radix radix) in Str2Num() argument
380 ss << r << str; in Str2Num()
391 uint32_t DecStr2Uint(const string& str) in DecStr2Uint() argument
394 Str2Num(str, i, Radix::RADIX_DEC); in DecStr2Uint()
403 uint32_t HexStr2Uint(const string& str) in HexStr2Uint() argument
406 Str2Num(str, i, Radix::RADIX_HEX); in HexStr2Uint()