diff options
author | cedeel@gmail.com <cedeel@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-14 15:06:06 +0200 |
---|---|---|
committer | cedeel@gmail.com <cedeel@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-14 15:06:06 +0200 |
commit | 92c59963f82f81aa3202657e7fdbb2592924ede3 (patch) | |
tree | b7eb2474528a4998fa102e3ec9119b908cee08b4 /source/StringUtils.h | |
parent | Added HOOK_WEATHER_CHANGE. (diff) | |
download | cuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.tar cuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.tar.gz cuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.tar.bz2 cuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.tar.lz cuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.tar.xz cuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.tar.zst cuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.zip |
Diffstat (limited to '')
-rw-r--r-- | source/StringUtils.h | 124 |
1 files changed, 62 insertions, 62 deletions
diff --git a/source/StringUtils.h b/source/StringUtils.h index be0b02445..fee71481e 100644 --- a/source/StringUtils.h +++ b/source/StringUtils.h @@ -1,62 +1,62 @@ -
-// StringUtils.h
-
-// Interfaces to various string helper functions
-
-
-
-
-#ifndef STRINGUTILS_H_INCLUDED
-#define STRINGUTILS_H_INCLUDED
-
-
-
-
-
-typedef std::string AString;
-typedef std::vector<AString> AStringVector;
-typedef std::list<AString> AStringList;
-
-
-
-
-
-/// Add the formated string to the existing data in the string
-extern AString & AppendVPrintf(AString & str, const char * format, va_list args);
-
-/// Output the formatted text into the string
-extern AString & Printf (AString & str, const char * format, ...);
-
-/// Add the formatted string to the existing data in the string
-extern AString & AppendPrintf (AString & str, const char * format, ...);
-
-/// Split the string at delimiters, return as a stringvector
-extern AStringVector StringSplit(const AString & str, const AString & delim);
-
-/// Trime whitespace at both ends of the string
-extern AString TrimString(const AString & str);
-
-/// In-place string conversion to uppercase; returns the same string
-extern AString & StrToUpper(AString & s);
-
-/// Case-insensitive string comparison; returns 0 if the strings are the same
-extern int NoCaseCompare(const AString & s1, const AString & s2);
-
-/// Replaces *each* occurence of iNeedle in iHayStack with iReplaceWith
-extern void ReplaceString(AString & iHayStack, const AString & iNeedle, const AString & iReplaceWith);
-
-/// Returns the list of all items in the specified directory (files, folders, nix pipes, whatever's there)
-extern AStringList GetDirectoryContents(const char * a_Directory);
-
-
-
-// If you have any other string helper functions, declare them here
-
-
-
-
-#endif // STRINGUTILS_H_INCLUDED
-
-
-
-
+ +// StringUtils.h + +// Interfaces to various string helper functions + + + + +#ifndef STRINGUTILS_H_INCLUDED +#define STRINGUTILS_H_INCLUDED + + + + + +typedef std::string AString; +typedef std::vector<AString> AStringVector; +typedef std::list<AString> AStringList; + + + + + +/// Add the formated string to the existing data in the string +extern AString & AppendVPrintf(AString & str, const char * format, va_list args); + +/// Output the formatted text into the string +extern AString & Printf (AString & str, const char * format, ...); + +/// Add the formatted string to the existing data in the string +extern AString & AppendPrintf (AString & str, const char * format, ...); + +/// Split the string at delimiters, return as a stringvector +extern AStringVector StringSplit(const AString & str, const AString & delim); + +/// Trime whitespace at both ends of the string +extern AString TrimString(const AString & str); + +/// In-place string conversion to uppercase; returns the same string +extern AString & StrToUpper(AString & s); + +/// Case-insensitive string comparison; returns 0 if the strings are the same +extern int NoCaseCompare(const AString & s1, const AString & s2); + +/// Replaces *each* occurence of iNeedle in iHayStack with iReplaceWith +extern void ReplaceString(AString & iHayStack, const AString & iNeedle, const AString & iReplaceWith); + +/// Returns the list of all items in the specified directory (files, folders, nix pipes, whatever's there) +extern AStringList GetDirectoryContents(const char * a_Directory); + + + +// If you have any other string helper functions, declare them here + + + + +#endif // STRINGUTILS_H_INCLUDED + + + + |