From: Kent R. Spillner Date: Wed, 18 Dec 2013 16:27:46 GMT Subject: Re: [PATCH 03/12] Add and use skip_prefix_defval() Message-ID: <20131218162746.GA15334@sl4mmy.zerosphere.org> In-Reply-To: <1387378437-20646-4-git-send-email-pclouds@gmail.com> On Wed, Dec 18, 2013 at 09:53:48PM +0700, Nguyễn Thái Ngọc Duy wrote: > This is a variant of skip_prefix() that returns a specied pointer > instead of NULL if no prefix is found. It's helpful to simplify > > if (starts_with(foo, "bar")) > foo += 3; > > into > > foo = skip_prefix_gently(foo, "bar", foo); Should this be skip_prefix_defval instead of skip_prefix_gently?