| commit | ac8da2a7dfba9696fc7a6570b04a6cf069613183 | [log] [tgz] |
|---|---|---|
| author | Josh Gao <jmgao@google.com> | Wed Feb 20 19:36:00 2019 -0800 |
| committer | Josh Gao <jmgao@google.com> | Mon Feb 25 13:49:25 2019 -0800 |
| tree | 58e9701155e1837a74e39a97bb9eed8fe03ec315 | |
| parent | aeca208385ba5a8307e1c297548eef0ef1999c6f [diff] |
adb: add helper to consume a prefix on a string_view.
It's error-prone to manually writing code of the following form:
if (foo.starts_with("some_prefix:")) {
foo.remove_prefix(strlen("some_prefix:"));
}
Add a helper to do that for us.
Test: mma
Change-Id: I5df391deba8b6c036fcbf17a1f1c79af8d9abd2b