From 3b473f7a67a8feb694856dd705454fdb9945b319 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sat, 28 Sep 2013 19:28:19 +0200 Subject: Added URLDecode() and ReplaceAllCharOccurrences() to StringUtils. --- source/StringUtils.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/StringUtils.h') diff --git a/source/StringUtils.h b/source/StringUtils.h index 211799e91..929e6fd5b 100644 --- a/source/StringUtils.h +++ b/source/StringUtils.h @@ -72,6 +72,12 @@ 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 + // If you have any other string helper functions, declare them here -- cgit v1.2.3