summaryrefslogtreecommitdiffstats
path: root/src/StringUtils.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-01-24 09:39:14 +0100
committerMattes D <github@xoft.cz>2015-01-27 14:53:25 +0100
commit40e231bc29e453ecb685b02204cec46c458b80d7 (patch)
tree86f3e902bab424ecc42f56c6a1d80238411b8b7f /src/StringUtils.h
parentDebuggers: Logging the os.clock for console-scheduled tasks. (diff)
downloadcuberite-40e231bc29e453ecb685b02204cec46c458b80d7.tar
cuberite-40e231bc29e453ecb685b02204cec46c458b80d7.tar.gz
cuberite-40e231bc29e453ecb685b02204cec46c458b80d7.tar.bz2
cuberite-40e231bc29e453ecb685b02204cec46c458b80d7.tar.lz
cuberite-40e231bc29e453ecb685b02204cec46c458b80d7.tar.xz
cuberite-40e231bc29e453ecb685b02204cec46c458b80d7.tar.zst
cuberite-40e231bc29e453ecb685b02204cec46c458b80d7.zip
Diffstat (limited to '')
-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)
{