Lines Matching refs:value

88 void AppendEscapedStringTo(std::string* str, const Slice& value) {  in AppendEscapedStringTo()  argument
89 for (size_t i = 0; i < value.size(); i++) { in AppendEscapedStringTo()
90 char c = value[i]; in AppendEscapedStringTo()
152 std::string EscapeString(const Slice& value) { in EscapeString() argument
154 AppendEscapedStringTo(&r, value); in EscapeString()
268 bool ParseBoolean(const std::string& type, const std::string& value) { in ParseBoolean() argument
269 if (value == "true" || value == "1") { in ParseBoolean()
271 } else if (value == "false" || value == "0") { in ParseBoolean()
277 uint32_t ParseUint32(const std::string& value) { in ParseUint32() argument
278 uint64_t num = ParseUint64(value); in ParseUint32()
282 throw std::out_of_range(value); in ParseUint32()
286 int32_t ParseInt32(const std::string& value) { in ParseInt32() argument
287 int64_t num = ParseInt64(value); in ParseInt32()
291 throw std::out_of_range(value); in ParseInt32()
297 uint64_t ParseUint64(const std::string& value) { in ParseUint64() argument
300 uint64_t num = std::stoull(value.c_str(), &endchar); in ParseUint64()
303 uint64_t num = std::strtoul(value.c_str(), &endptr, 0); in ParseUint64()
304 endchar = endptr - value.c_str(); in ParseUint64()
307 if (endchar < value.length()) { in ParseUint64()
308 char c = value[endchar]; in ParseUint64()
322 int64_t ParseInt64(const std::string& value) { in ParseInt64() argument
325 int64_t num = std::stoll(value.c_str(), &endchar); in ParseInt64()
328 int64_t num = std::strtoll(value.c_str(), &endptr, 0); in ParseInt64()
329 endchar = endptr - value.c_str(); in ParseInt64()
332 if (endchar < value.length()) { in ParseInt64()
333 char c = value[endchar]; in ParseInt64()
347 int ParseInt(const std::string& value) { in ParseInt() argument
350 int num = std::stoi(value.c_str(), &endchar); in ParseInt()
353 int num = std::strtoul(value.c_str(), &endptr, 0); in ParseInt()
354 endchar = endptr - value.c_str(); in ParseInt()
357 if (endchar < value.length()) { in ParseInt()
358 char c = value[endchar]; in ParseInt()
370 double ParseDouble(const std::string& value) { in ParseDouble() argument
372 return std::stod(value); in ParseDouble()
374 return std::strtod(value.c_str(), 0); in ParseDouble()
378 size_t ParseSizeT(const std::string& value) { in ParseSizeT() argument
379 return static_cast<size_t>(ParseUint64(value)); in ParseSizeT()
382 std::vector<int> ParseVectorInt(const std::string& value) { in ParseVectorInt() argument
385 while (start < value.size()) { in ParseVectorInt()
386 size_t end = value.find(':', start); in ParseVectorInt()
388 result.push_back(ParseInt(value.substr(start))); in ParseVectorInt()
391 result.push_back(ParseInt(value.substr(start, end - start))); in ParseVectorInt()
398 bool SerializeIntVector(const std::vector<int>& vec, std::string* value) { in SerializeIntVector() argument
399 *value = ""; in SerializeIntVector()
402 *value += ":"; in SerializeIntVector()
404 *value += ToString(vec[i]); in SerializeIntVector()