From: Bartosz Golaszewski Date: Tue, 25 Aug 2015 11:10:00 +0000 (+0200) Subject: libbb: add a comment describing the way is_prefixed_with() works X-Git-Tag: 1_24_0~57 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0a4d0e8fbf119e61f7223ac00a42505abf7eb168;p=oweals%2Fbusybox.git libbb: add a comment describing the way is_prefixed_with() works Signed-off-by: Bartosz Golaszewski Signed-off-by: Denys Vlasenko --- diff --git a/libbb/compare_string_array.c b/libbb/compare_string_array.c index 450916c3a..cdcb2718d 100644 --- a/libbb/compare_string_array.c +++ b/libbb/compare_string_array.c @@ -5,6 +5,11 @@ #include "libbb.h" +/* + * Return NULL if string is not prefixed with key. Return pointer to the + * first character in string after the prefix key. If key is an empty string, + * return pointer to the beginning of string. + */ char* FAST_FUNC is_prefixed_with(const char *string, const char *key) { #if 0 /* Two passes over key - probably slower */