Parse the given Ref string from the position Offset, to exactly match the given string Patt. Returns number of characters considered if successful.
| 299 | // Parse the given Ref string from the position Offset, to exactly match the |
| 300 | // given string Patt. Returns number of characters considered if successful. |
| 301 | static size_t ParseCustomString(const std::string &Ref, size_t Offset, |
| 302 | const char *Patt) { |
| 303 | size_t Len = strlen(Patt); |
| 304 | if (Offset + Len > Ref.size()) |
| 305 | return 0; |
| 306 | return Ref.compare(Offset, Len, Patt) == 0 ? Len : 0; |
| 307 | } |
| 308 | |
| 309 | // Parse a location, like: |
| 310 | // \\?\UNC\Server\Share\ \\?\C:\ \\Server\Share\ \ C:\ C: |
no test coverage detected