From 75b2ff1216892032277367725c2be0b037cbc257 Mon Sep 17 00:00:00 2001 From: Andrew Sidwell Date: Mon, 11 Aug 2008 02:57:54 +0000 Subject: - Remove an unused function from utils/string.c - Remove the no-op FINISH() macro from the tokeniser - Fix a typo in the charset detector svn path=/trunk/hubbub/; revision=5007 --- src/utils/string.c | 27 --------------------------- src/utils/string.h | 4 ++-- 2 files changed, 2 insertions(+), 29 deletions(-) (limited to 'src/utils') diff --git a/src/utils/string.c b/src/utils/string.c index 5a2a0bc..0a5d44d 100644 --- a/src/utils/string.c +++ b/src/utils/string.c @@ -11,33 +11,6 @@ #include "utils/string.h" -/** - * Check if one string starts with another. - * - * \param a String to compare - * \param a_len Length of first string - * \param b String to compare - * \param b_len Length of second string - */ -bool hubbub_string_starts(const uint8_t *a, size_t a_len, - const uint8_t *b, size_t b_len) -{ - uint8_t z1, z2; - - if (a_len < b_len) - return false; - - for (const uint8_t *s1 = a, *s2 = b; b_len > 0; s1++, s2++, b_len--) - { - z1 = *s1; - z2 = *s2; - if (z1 != z2) return false; - if (!z1) return true; - } - - return true; -} - /** * Check that one string is exactly equal to another * diff --git a/src/utils/string.h b/src/utils/string.h index cb65493..2487428 100644 --- a/src/utils/string.h +++ b/src/utils/string.h @@ -8,11 +8,11 @@ #ifndef hubbub_string_h_ #define hubbub_string_h_ -bool hubbub_string_starts(const uint8_t *a, size_t a_len, - const uint8_t *b, size_t b_len); +/** Match two strings case-sensitively */ bool hubbub_string_match(const uint8_t *a, size_t a_len, const uint8_t *b, size_t b_len); +/** Match two strings case-insensitively */ bool hubbub_string_match_ci(const uint8_t *a, size_t a_len, const uint8_t *b, size_t b_len); -- cgit v1.2.3