diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-09-19 17:33:22 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-09-19 17:33:22 +0200 |
commit | 09ca7d144afaa4c3fb7727390d11a10c3a29d98e (patch) | |
tree | 4dadccef8ed72f8954b8d079f901709b578f6171 /src/StringUtils.h | |
parent | Created MobSpawnerEntity class. (diff) | |
parent | QtBiomeVisualiser: More gcc fixes. (diff) | |
download | cuberite-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.h | 5 |
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) |