Home | History | Annotate | Download | only in src

Lines Matching refs:string

27 bool ParseInt32(const std::string& src_text, const char* str, int32_t* value) {
32 // Has strtol() consumed all characters in the string?
61 bool ParseDouble(const std::string& src_text, const char* str, double* value) {
66 // Has strtol() consumed all characters in the string?
81 static std::string FlagToEnvVar(const char* flag) {
82 const std::string flag_str(flag);
84 std::string env_var;
96 const std::string env_var = FlagToEnvVar(flag);
106 const std::string env_var = FlagToEnvVar(flag);
114 if (!ParseInt32(std::string("Environment variable ") + env_var, string_value,
123 // Reads and returns the string environment variable corresponding to
126 const std::string env_var = FlagToEnvVar(flag);
131 // Parses a string as a command line flag. The string should have
142 const std::string flag_str = std::string("--") + std::string(flag);
157 // Returns the string after "=".
162 // Gets the value of the flag as a string.
168 // Converts the string value to a bool.
174 // Gets the value of the flag as a string.
181 return ParseInt32(std::string("The value of flag --") + flag, value_str,
186 // Gets the value of the flag as a string.
193 return ParseDouble(std::string("The value of flag --") + flag, value_str,
197 bool ParseStringFlag(const char* str, const char* flag, std::string* value) {
198 // Gets the value of the flag as a string.
212 bool IsTruthyFlagValue(const std::string& value) {