/////////////////////////////////////////////////////////////////////////// Compares two strings, and returns the number bytes in common. left: wonderful right: wonderbread returns: ^ 6
| 265 | // right: wonderbread |
| 266 | // returns: ^ 6 |
| 267 | std::string::size_type Lexer::commonLength(const std::string& left, const std::string& right) { |
| 268 | std::string::size_type l = 0; |
| 269 | std::string::size_type r = 0; |
| 270 | while (left[l] == right[r] && utf8_next_char(left, l) && utf8_next_char(right, r)); |
| 271 | |
| 272 | return l; |
| 273 | } |
| 274 | |
| 275 | //////////////////////////////////////////////////////////////////////////////// |
| 276 | // Compares two strings with offsets, and returns the number bytes in common. |
nothing calls this directly
no outgoing calls
no test coverage detected