libbb: add a comment describing the way is_prefixed_with() works

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Bartosz Golaszewski 2015-08-25 13:10:00 +02:00 committed by Denys Vlasenko
parent b432923e29
commit 0a4d0e8fbf
1 changed files with 5 additions and 0 deletions

View File

@ -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 */