diff options
author | Christian Biesinger <cbiesinger@google.com> | 2019-10-01 13:41:58 -0500 |
---|---|---|
committer | Christian Biesinger <cbiesinger@google.com> | 2019-10-28 12:20:13 -0500 |
commit | 87f34879e5339be458505ca85f70cff346295140 (patch) | |
tree | 29821d4b4a5077e384f42d2e82c0656c61a438ab /libctf/ctf-decl.c | |
parent | 1ee3542c0a3830cac933ae56cc5f29e9c3f7c6ca (diff) | |
download | gdb-87f34879e5339be458505ca85f70cff346295140.zip gdb-87f34879e5339be458505ca85f70cff346295140.tar.gz gdb-87f34879e5339be458505ca85f70cff346295140.tar.bz2 |
Add a string_view version of startswith
Makes sure that the string is longer than prefix, so that strncmp will
do the right thing even if the string is not null-terminated.
For use in my string_view conversion patch:
https://sourceware.org/ml/gdb-patches/2019-10/msg00030.html
https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/125
gdb/ChangeLog:
2019-10-28 Christian Biesinger <cbiesinger@google.com>
* gdbsupport/common-utils.h (startswith): Add an overloaded version
that takes gdb::string_view arguments.
Change-Id: I5389855de2fd70e7065a789a79374b0693651b71
Diffstat (limited to 'libctf/ctf-decl.c')
0 files changed, 0 insertions, 0 deletions