diff options
author | Mattes D <github@xoft.cz> | 2013-10-07 22:19:14 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2013-10-07 22:19:14 +0200 |
commit | e3ba3b8f97f8dd2a4e6dc7ec17f61a2d576fe346 (patch) | |
tree | 47b7c978eb2dfdb3771b1edf907482ade9eb1d34 /source/StringUtils.h | |
parent | Fixed startup timings on server restart. (diff) | |
parent | Fixed memory leaks in the HTTP framework (diff) | |
download | cuberite-e3ba3b8f97f8dd2a4e6dc7ec17f61a2d576fe346.tar cuberite-e3ba3b8f97f8dd2a4e6dc7ec17f61a2d576fe346.tar.gz cuberite-e3ba3b8f97f8dd2a4e6dc7ec17f61a2d576fe346.tar.bz2 cuberite-e3ba3b8f97f8dd2a4e6dc7ec17f61a2d576fe346.tar.lz cuberite-e3ba3b8f97f8dd2a4e6dc7ec17f61a2d576fe346.tar.xz cuberite-e3ba3b8f97f8dd2a4e6dc7ec17f61a2d576fe346.tar.zst cuberite-e3ba3b8f97f8dd2a4e6dc7ec17f61a2d576fe346.zip |
Diffstat (limited to 'source/StringUtils.h')
-rw-r--r-- | source/StringUtils.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/StringUtils.h b/source/StringUtils.h index 211799e91..ec9ba96ce 100644 --- a/source/StringUtils.h +++ b/source/StringUtils.h @@ -45,6 +45,9 @@ extern AString TrimString(const AString & str); // tolua_export /// In-place string conversion to uppercase; returns the same string extern AString & StrToUpper(AString & s); +/// In-place string conversion to lowercase; returns the same string +extern AString & StrToLower(AString & s); + /// Case-insensitive string comparison; returns 0 if the strings are the same extern int NoCaseCompare(const AString & s1, const AString & s2); // tolua_export @@ -72,6 +75,15 @@ extern AString EscapeString(const AString & a_Message); // tolua_export /// Removes all control codes used by MC for colors and styles extern AString StripColorCodes(const AString & a_Message); // tolua_export +/// URL-Decodes the given string, replacing all "%HH" into the correct characters. Invalid % sequences are left intact +extern AString URLDecode(const AString & a_String); // Cannot export to Lua automatically - would generated an extra return value + +/// Replaces all occurrences of char a_From inside a_String with char a_To. +extern AString ReplaceAllCharOccurrences(const AString & a_String, char a_From, char a_To); // Needn't export to Lua, since Lua doesn't have chars anyway + +/// Decodes a Base64-encoded string into the raw data +extern AString Base64Decode(const AString & a_Base64String); + // If you have any other string helper functions, declare them here |