| 1028 | |
| 1029 | |
| 1030 | static bool ParsePrechecks(const std::string& str) |
| 1031 | { |
| 1032 | if (str.empty()) // No empty string allowed |
| 1033 | return false; |
| 1034 | if (str.size() >= 1 && (IsSpace(str[0]) || IsSpace(str[str.size()-1]))) // No padding allowed |
| 1035 | return false; |
| 1036 | if (str.size() != strlen(str.c_str())) // No embedded NUL characters allowed |
| 1037 | return false; |
| 1038 | return true; |
| 1039 | } |
| 1040 | |
| 1041 | bool ParseInt32(const std::string& str, int32_t *out) |
| 1042 | { |
no test coverage detected