aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/base/String.h
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2020-07-21 06:15:04 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2020-07-21 06:15:04 -0400
commitfbc30002ab3438356c0476e70c4577a0310d52c0 (patch)
tree62b4c241ad0b2a65b0e430b9f7710ed944d30fb1 /src/lib/base/String.h
parentdff8b887edf10407f22aaab9d147948cd5491f0a (diff)
New upstream version 2.3.3+dfsg.upstream/2.3.3+dfsg
Diffstat (limited to 'src/lib/base/String.h')
-rw-r--r--src/lib/base/String.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/lib/base/String.h b/src/lib/base/String.h
index 3661461..73526b4 100644
--- a/src/lib/base/String.h
+++ b/src/lib/base/String.h
@@ -29,7 +29,7 @@ typedef std::string String;
namespace barrier {
-//! String utilities
+//! std::string utilities
/*!
Provides functions for string manipulation.
*/
@@ -45,67 +45,67 @@ characters and conversion specifications introduced by `\%':
All arguments in the variable list are const char*. Positional
elements are indexed from 1.
*/
-String format(const char* fmt, ...);
+std::string format(const char* fmt, ...);
//! Format positional arguments
/*!
Same as format() except takes va_list.
*/
-String vformat(const char* fmt, va_list);
+std::string vformat(const char* fmt, va_list);
//! Print a string using sprintf-style formatting
/*!
-Equivalent to sprintf() except the result is returned as a String.
+Equivalent to sprintf() except the result is returned as a std::string.
*/
-String sprintf(const char* fmt, ...);
+std::string sprintf(const char* fmt, ...);
//! Find and replace all
/*!
Finds \c find inside \c subject and replaces it with \c replace
*/
-void findReplaceAll(String& subject, const String& find, const String& replace);
+void findReplaceAll(std::string& subject, const std::string& find, const std::string& replace);
//! Remove file extension
/*!
Finds the last dot and remove all characters from the dot to the end
*/
-String removeFileExt(String filename);
+std::string removeFileExt(std::string filename);
//! Convert into hexdecimal
/*!
Convert each character in \c subject into hexdecimal form with \c width
*/
-void toHex(String& subject, int width, const char fill = '0');
+void toHex(std::string& subject, int width, const char fill = '0');
//! Convert to all uppercase
/*!
Convert each character in \c subject to uppercase
*/
-void uppercase(String& subject);
+void uppercase(std::string& subject);
//! Remove all specific char in suject
/*!
Remove all specific \c c in \c suject
*/
-void removeChar(String& subject, const char c);
+void removeChar(std::string& subject, const char c);
//! Convert a size type to a string
/*!
Convert an size type to a string
*/
-String sizeTypeToString(size_t n);
+std::string sizeTypeToString(size_t n);
//! Convert a string to a size type
/*!
Convert an a \c string to an size type
*/
-size_t stringToSizeType(String string);
+size_t stringToSizeType(std::string string);
//! Split a string into substrings
/*!
Split a \c string that separated by a \c c into substrings
*/
-std::vector<String> splitString(String string, const char c);
+std::vector<std::string> splitString(std::string string, const char c);
//! Case-insensitive comparisons
/*!
@@ -114,21 +114,21 @@ This class provides case-insensitve comparison functions.
class CaselessCmp {
public:
//! Same as less()
- bool operator()(const String& a, const String& b) const;
+ bool operator()(const std::string& a, const std::string& b) const;
//! Returns true iff \c a is lexicographically less than \c b
- static bool less(const String& a, const String& b);
+ static bool less(const std::string& a, const std::string& b);
//! Returns true iff \c a is lexicographically equal to \c b
- static bool equal(const String& a, const String& b);
+ static bool equal(const std::string& a, const std::string& b);
//! Returns true iff \c a is lexicographically less than \c b
- static bool cmpLess(const String::value_type& a,
- const String::value_type& b);
+ static bool cmpLess(const std::string::value_type& a,
+ const std::string::value_type& b);
//! Returns true iff \c a is lexicographically equal to \c b
- static bool cmpEqual(const String::value_type& a,
- const String::value_type& b);
+ static bool cmpEqual(const std::string::value_type& a,
+ const std::string::value_type& b);
};
}