[PATCH v2 01/10] string: provide strends()

Andy Shevchenko andriy.shevchenko at intel.com
Wed Oct 22 08:23:50 PDT 2025


On Wed, Oct 22, 2025 at 03:40:00PM +0200, Bartosz Golaszewski wrote:
> On Wed, Oct 22, 2025 at 3:34 PM Andy Shevchenko
> <andy.shevchenko at gmail.com> wrote:
> > On Wed, Oct 22, 2025 at 4:11 PM Bartosz Golaszewski <brgl at bgdev.pl> wrote:

...

> > > static inline bool strstarts(const char *str, const char *prefix)

> > >         return strncmp(str, prefix, strlen(prefix)) == 0;
> > >  }
> > >
> > > +bool strends(const char *str, const char *suffix);
> >
> > Why not static inline as strstarts()?
> 
> Because it's not a oneliner.

So, and how does it answer the question? What is the obstacle here that it may
not be a static inline few-liner?

-- 
With Best Regards,
Andy Shevchenko





More information about the linux-arm-kernel mailing list