summaryrefslogtreecommitdiffstats
path: root/src/StringUtils.h
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2015-02-06 21:52:14 +0100
committerHowaner <franzi.moos@googlemail.com>2015-02-06 21:52:14 +0100
commit2c7925f0adc17d7680ff9791832ab2c349c2301f (patch)
treeef6233b0d9dece6f7520996f2a4d850470e2c2d3 /src/StringUtils.h
parentReadded old DistributeStackToAreas() comment. (diff)
parentSwitched LuaState to use sizeof... (diff)
downloadcuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.tar
cuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.tar.gz
cuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.tar.bz2
cuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.tar.lz
cuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.tar.xz
cuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.tar.zst
cuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.zip
Diffstat (limited to 'src/StringUtils.h')
-rw-r--r--src/StringUtils.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/StringUtils.h b/src/StringUtils.h
index bfe2a41fa..bc3bb7a2c 100644
--- a/src/StringUtils.h
+++ b/src/StringUtils.h
@@ -115,7 +115,16 @@ a_Output is first cleared and then each separate string is pushed back into a_Ou
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.
+/** Merges the two vectors of strings, removing duplicate entries from the second vector.
+The resulting vector contains items from a_Strings1 first, then from a_Strings2.
+The order of items doesn't change, only the duplicates are removed.
+If a_Strings1 contains duplicates, the result will still contain those duplicates. */
+extern AStringVector MergeStringVectors(const AStringVector & a_Strings1, const AStringVector & a_Strings2);
+
+/** Concatenates the specified strings into a single string, separated by the specified separator. */
+extern AString StringsConcat(const AStringVector & a_Strings, char a_Separator);
+
+/** Parses any integer type. Checks bounds and returns errors out of band. */
template <class T>
bool StringToInteger(const AString & a_str, T & a_Num)
{