← Commit list

0a4d0e8fb

Bartosz Golaszewski
Bartosz Golaszewski
2015-08-25
SUCCESS Duration: 176s

Subject

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

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

libbb/compare_string_array.c+5 -0
@@ -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 */