From af4133e3c92c78cc19ff14b876be6afcab1db091 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 28 Nov 2013 18:48:35 +0100 Subject: Util/StringUtil: add StringStartsWith() Replaces GLib's g_str_has_prefix(). --- src/util/StringUtil.hxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/util/StringUtil.hxx') diff --git a/src/util/StringUtil.hxx b/src/util/StringUtil.hxx index 1c67910a9..f25160107 100644 --- a/src/util/StringUtil.hxx +++ b/src/util/StringUtil.hxx @@ -40,6 +40,10 @@ strchug_fast(char *p) return const_cast(strchug_fast((const char *)p)); } +gcc_pure +bool +StringStartsWith(const char *haystack, const char *needle); + /** * Checks whether a string array contains the specified string. * -- cgit v1.2.3