Re: [PATCH v2] C: use skip-prefix to avoid hardcoded string length
- From
Andrei Rybak <rybak.a.v@gmail.com>
- Date
- Jan 31, 2020, 20:15 UTC
- Message-ID
- <CACayv=hcH=dvfup2fzm5-OKYxEyC1m7YBTfpm=6z0BhO=hK-cQ@mail.gmail.com>
- In-Reply-To
- <xmqqa764d9f1.fsf_-_@gitster-ct.c.googlers.com>
On 1/30/20 8:35 PM, Junio C Hamano wrote:
Show 9 quoted lines
> We often skip an optional prefix in a string with a hardcoded > constant, e.g. > > if (starts_with(string, "prefix")) > string += 6; > > which is less error prone when written > > skip_prefix(string, "prefix", &string);
Should the subject line say "skip_prefix" with an underscore instead of "skip-prefix" with a dash?