aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/StringUtil.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-03-04 20:22:05 +0100
committerMax Kellermann <max@duempel.org>2015-03-04 20:22:05 +0100
commit250332a8d51c6fc79f156da748b02761143fabe6 (patch)
tree2c34624d0e12f5e1e1a5694af511c9558d1d1d68 /src/util/StringUtil.hxx
parent39825c662239c3a9b5e6e4d534557dc40c076a79 (diff)
downloadmpd-250332a8d51c6fc79f156da748b02761143fabe6.tar.gz
mpd-250332a8d51c6fc79f156da748b02761143fabe6.tar.xz
mpd-250332a8d51c6fc79f156da748b02761143fabe6.zip
util/StringUtil: reorder functions
Diffstat (limited to 'src/util/StringUtil.hxx')
-rw-r--r--src/util/StringUtil.hxx56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/util/StringUtil.hxx b/src/util/StringUtil.hxx
index 4f44ab94a..a88645250 100644
--- a/src/util/StringUtil.hxx
+++ b/src/util/StringUtil.hxx
@@ -24,6 +24,34 @@
#include <stddef.h>
+gcc_pure
+bool
+StringStartsWith(const char *haystack, const char *needle);
+
+gcc_pure
+bool
+StringEndsWith(const char *haystack, const char *needle);
+
+/**
+ * Check if the given string ends with the specified suffix. If yes,
+ * returns the position of the suffix, and nullptr otherwise.
+ */
+gcc_pure
+const char *
+FindStringSuffix(const char *p, const char *suffix);
+
+/**
+ * Copy a string. If the buffer is too small, then the string is
+ * truncated. This is a safer version of strncpy().
+ *
+ * @param size the size of the destination buffer (including the null
+ * terminator)
+ * @return a pointer to the null terminator
+ */
+gcc_nonnull_all
+char *
+CopyString(char *dest, const char *src, size_t size);
+
/**
* Returns a pointer to the first non-whitespace character in the
* string, or to the end of the string.
@@ -82,34 +110,6 @@ StripRight(char *p);
char *
Strip(char *p);
-gcc_pure
-bool
-StringStartsWith(const char *haystack, const char *needle);
-
-gcc_pure
-bool
-StringEndsWith(const char *haystack, const char *needle);
-
-/**
- * Check if the given string ends with the specified suffix. If yes,
- * returns the position of the suffix, and nullptr otherwise.
- */
-gcc_pure
-const char *
-FindStringSuffix(const char *p, const char *suffix);
-
-/**
- * Copy a string. If the buffer is too small, then the string is
- * truncated. This is a safer version of strncpy().
- *
- * @param size the size of the destination buffer (including the null
- * terminator)
- * @return a pointer to the null terminator
- */
-gcc_nonnull_all
-char *
-CopyString(char *dest, const char *src, size_t size);
-
/**
* Checks whether a string array contains the specified string.
*