summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorAndrew Sidwell <andy@entai.co.uk>2008-08-11 02:57:54 +0000
committerAndrew Sidwell <andy@entai.co.uk>2008-08-11 02:57:54 +0000
commit75b2ff1216892032277367725c2be0b037cbc257 (patch)
treeda0828cdfc0ca4e04ac091605896fa99607d6bf2 /src/utils
parente77edf053af3932acc370d66716ad3a41e96dda5 (diff)
downloadlibhubbub-75b2ff1216892032277367725c2be0b037cbc257.tar.gz
libhubbub-75b2ff1216892032277367725c2be0b037cbc257.tar.bz2
- 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
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/string.c27
-rw-r--r--src/utils/string.h4
2 files changed, 2 insertions, 29 deletions
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
@@ -12,33 +12,6 @@
/**
- * 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
*
* \param a String to compare
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);