summaryrefslogtreecommitdiffstats
path: root/src/StringUtils.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-01-12 10:04:16 +0100
committermadmaxoft <github@xoft.cz>2014-01-12 10:04:16 +0100
commit180b9b90993870532a8daa2ee6498005b6c3bf49 (patch)
treedac846b760b6f5fd294fbd771975dd55b0856c0d /src/StringUtils.h
parentFixed Linux configuration. (diff)
parentDisabled a useless MSVC warning in Bindings.cpp. (diff)
downloadcuberite-180b9b90993870532a8daa2ee6498005b6c3bf49.tar
cuberite-180b9b90993870532a8daa2ee6498005b6c3bf49.tar.gz
cuberite-180b9b90993870532a8daa2ee6498005b6c3bf49.tar.bz2
cuberite-180b9b90993870532a8daa2ee6498005b6c3bf49.tar.lz
cuberite-180b9b90993870532a8daa2ee6498005b6c3bf49.tar.xz
cuberite-180b9b90993870532a8daa2ee6498005b6c3bf49.tar.zst
cuberite-180b9b90993870532a8daa2ee6498005b6c3bf49.zip
Diffstat (limited to 'src/StringUtils.h')
-rw-r--r--src/StringUtils.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/StringUtils.h b/src/StringUtils.h
index 3917cc4ec..2373f3843 100644
--- a/src/StringUtils.h
+++ b/src/StringUtils.h
@@ -81,6 +81,18 @@ extern AString ReplaceAllCharOccurrences(const AString & a_String, char a_From,
/// Decodes a Base64-encoded string into the raw data
extern AString Base64Decode(const AString & a_Base64String);
+/// Encodes a string into Base64
+extern AString Base64Encode(const AString & a_Input);
+
+/// Reads two bytes from the specified memory location and interprets them as BigEndian short
+extern short GetBEShort(const char * a_Mem);
+
+/// Reads four bytes from the specified memory location and interprets them as BigEndian int
+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);
+
// If you have any other string helper functions, declare them here