Lines Matching refs:str

46 impl::duplicate(const char* str)  in duplicate()  argument
48 char* copy = new char[std::strlen(str) + 1]; in duplicate()
49 std::strcpy(copy, str); in duplicate()
54 impl::match(const std::string& str, const std::string& regex) in match() argument
60 found = str.empty(); in match()
68 const int res = ::regexec(&preg, str.c_str(), 0, NULL, 0); in match()
80 impl::to_lower(const std::string& str) in to_lower() argument
83 for (std::string::const_iterator iter = str.begin(); iter != str.end(); in to_lower()
90 impl::split(const std::string& str, const std::string& delim) in split() argument
95 while (pos < str.length() && newpos != std::string::npos) { in split()
96 newpos = str.find(delim, pos); in split()
98 words.push_back(str.substr(pos, newpos - pos)); in split()
106 impl::trim(const std::string& str) in trim() argument
108 std::string::size_type pos1 = str.find_first_not_of(" \t"); in trim()
109 std::string::size_type pos2 = str.find_last_not_of(" \t"); in trim()
114 return str.substr(0, str.length() - pos2); in trim()
116 return str.substr(pos1); in trim()
118 return str.substr(pos1, pos2 - pos1 + 1); in trim()
122 impl::to_bool(const std::string& str) in to_bool() argument
126 atf_error_t err = atf_text_to_bool(str.c_str(), &b); in to_bool()
134 impl::to_bytes(std::string str) in to_bytes() argument
136 if (str.empty()) in to_bytes()
139 const char unit = str[str.length() - 1]; in to_bytes()
153 str.erase(str.length() - 1); in to_bytes()
155 return to_type< int64_t >(str) * multiplier; in to_bytes()