| 39 | } |
| 40 | |
| 41 | void SplitAt(ConstStringRef str, char split_char, ConstStringRef * left, ConstStringRef * right) |
| 42 | { |
| 43 | for (const char * p = str.Begin; p < str.End; ++p) |
| 44 | { |
| 45 | if (*p == split_char) |
| 46 | { |
| 47 | left->Begin = str.Begin; |
| 48 | left->End = p; |
| 49 | right->Begin = p+1; |
| 50 | right->End = str.End; |
| 51 | return; |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | // Split char wasn't found - just return the whole string as 'left'. |
| 56 | *left = str; |
| 57 | *right = ConstStringRef(); |
| 58 | } |
| 59 | |
| 60 | u32 ParseU32(ConstStringRef str, u32 base) |
| 61 | { |
no test coverage detected