Lines Matching refs:s
55 size_t ParseMemoryOption(const char* s, size_t div) { in ParseMemoryOption() argument
58 if (isdigit(*s)) { in ParseMemoryOption()
60 size_t val = strtoul(s, &s2, 10); in ParseMemoryOption()
61 if (s2 != s) { in ParseMemoryOption()
856 bool ParsedOptions::ParseStringAfterChar(const std::string& s, char c, std::string* parsed_value) { in ParseStringAfterChar() argument
857 std::string::size_type colon = s.find(c); in ParseStringAfterChar()
859 Usage("Missing char %c in option %s\n", c, s.c_str()); in ParseStringAfterChar()
863 *parsed_value = s.substr(colon + 1); in ParseStringAfterChar()
867 bool ParsedOptions::ParseInteger(const std::string& s, char after_char, int* parsed_value) { in ParseInteger() argument
868 std::string::size_type colon = s.find(after_char); in ParseInteger()
870 Usage("Missing char %c in option %s\n", after_char, s.c_str()); in ParseInteger()
873 const char* begin = &s[colon + 1]; in ParseInteger()
877 Usage("Failed to parse integer from %s\n", s.c_str()); in ParseInteger()
884 bool ParsedOptions::ParseUnsignedInteger(const std::string& s, char after_char, in ParseUnsignedInteger() argument
887 if (!ParseInteger(s, after_char, &i)) { in ParseUnsignedInteger()
891 Usage("Negative value %d passed for unsigned option %s\n", i, s.c_str()); in ParseUnsignedInteger()