| 5070 | } |
| 5071 | |
| 5072 | bool String::is_valid_int() const |
| 5073 | { |
| 5074 | int len = length(); |
| 5075 | |
| 5076 | if (len == 0) |
| 5077 | { |
| 5078 | return false; |
| 5079 | } |
| 5080 | |
| 5081 | int from = 0; |
| 5082 | if (len != 1 && (operator[](0) == '+' || operator[](0) == '-')) |
| 5083 | { |
| 5084 | from++; |
| 5085 | } |
| 5086 | |
| 5087 | for (int i = from; i < len; i++) |
| 5088 | { |
| 5089 | if (!is_digit(operator[](i))) |
| 5090 | { |
| 5091 | return false; // no start with number plz |
| 5092 | } |
| 5093 | } |
| 5094 | |
| 5095 | return true; |
| 5096 | } |
| 5097 | |
| 5098 | bool String::is_valid_hex_number(bool p_with_prefix) const |
| 5099 | { |
no test coverage detected