summaryrefslogtreecommitdiffstats
path: root/src/StringUtils.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-09-17 09:38:06 +0200
committermadmaxoft <github@xoft.cz>2014-09-17 09:38:06 +0200
commit3406957f1b4b6b49c1b571dcceb2b463def9e4c3 (patch)
treed7f755d903cb372a796473f1a82299fd00521688 /src/StringUtils.h
parentVoronoiMap: Added Jitter and OddRowOffset params. (diff)
downloadcuberite-3406957f1b4b6b49c1b571dcceb2b463def9e4c3.tar
cuberite-3406957f1b4b6b49c1b571dcceb2b463def9e4c3.tar.gz
cuberite-3406957f1b4b6b49c1b571dcceb2b463def9e4c3.tar.bz2
cuberite-3406957f1b4b6b49c1b571dcceb2b463def9e4c3.tar.lz
cuberite-3406957f1b4b6b49c1b571dcceb2b463def9e4c3.tar.xz
cuberite-3406957f1b4b6b49c1b571dcceb2b463def9e4c3.tar.zst
cuberite-3406957f1b4b6b49c1b571dcceb2b463def9e4c3.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)