Thread (34 messages) 34 messages, 7 authors, 2025-11-18

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

From: Bartosz Golaszewski <hidden>
Date: 2025-10-22 13:40:14
Also in: linux-arm-msm, linux-gpio, linux-hardening, linux-sound, lkml

On Wed, Oct 22, 2025 at 3:34 PM Andy Shevchenko
[off-list ref] wrote:
On Wed, Oct 22, 2025 at 4:11 PM Bartosz Golaszewski [off-list ref] wrote:
quoted
Implement a function for checking if a string ends with a different
string and add its kunit test cases.
...
quoted
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -562,4 +562,6 @@ 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.

Bartosz
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help