summaryrefslogtreecommitdiffstats
path: root/src/StringUtils.h
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-09-19 17:33:22 +0200
committerHowaner <franzi.moos@googlemail.com>2014-09-19 17:33:22 +0200
commit09ca7d144afaa4c3fb7727390d11a10c3a29d98e (patch)
tree4dadccef8ed72f8954b8d079f901709b578f6171 /src/StringUtils.h
parentCreated MobSpawnerEntity class. (diff)
parentQtBiomeVisualiser: More gcc fixes. (diff)
downloadcuberite-09ca7d144afaa4c3fb7727390d11a10c3a29d98e.tar
cuberite-09ca7d144afaa4c3fb7727390d11a10c3a29d98e.tar.gz
cuberite-09ca7d144afaa4c3fb7727390d11a10c3a29d98e.tar.bz2
cuberite-09ca7d144afaa4c3fb7727390d11a10c3a29d98e.tar.lz
cuberite-09ca7d144afaa4c3fb7727390d11a10c3a29d98e.tar.xz
cuberite-09ca7d144afaa4c3fb7727390d11a10c3a29d98e.tar.zst
cuberite-09ca7d144afaa4c3fb7727390d11a10c3a29d98e.zip
Diffstat (limited to 'src/StringUtils.h')
-rw-r--r--src/StringUtils.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/StringUtils.h b/src/StringUtils.h
index 72a90a8c2..a76894d05 100644
--- a/src/StringUtils.h
+++ b/src/StringUtils.h
@@ -99,6 +99,11 @@ extern int GetBEInt(const char * a_Mem);
/// Writes four bytes to the specified memory location so that they interpret as BigEndian int
extern void SetBEInt(char * a_Mem, Int32 a_Value);
+/** Splits a string that has embedded \0 characters, on those characters.
+a_Output is first cleared and then each separate string is pushed back into a_Output.
+Returns true if there are at least two strings in a_Output (there was at least one \0 separator). */
+extern bool SplitZeroTerminatedStrings(const AString & a_Strings, AStringVector & a_Output);
+
/// Parses any integer type. Checks bounds and returns errors out of band.
template <class T>
bool StringToInteger(const AString & a_str, T & a_Num)