mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
[Cleanup] Cleanup uses of Strings::ToInt to match correct type. (#3054)
* [Cleanup] Cleanup uses of Strings::ToInt to match correct type. * cleanup
This commit is contained in:
+8
-8
@@ -84,7 +84,7 @@ namespace EQ {
|
||||
|
||||
class Strings {
|
||||
public:
|
||||
static bool Contains(std::vector<std::string> container, std::string element);
|
||||
static bool Contains(std::vector<std::string> container, const std::string& element);
|
||||
static bool Contains(const std::string& subject, const std::string& search);
|
||||
static int ToInt(const std::string &s, int fallback = 0);
|
||||
static int64 ToBigInt(const std::string &s, int64 fallback = 0);
|
||||
@@ -96,9 +96,9 @@ public:
|
||||
static bool IsFloat(const std::string &s);
|
||||
static const std::string ToLower(std::string s);
|
||||
static const std::string ToUpper(std::string s);
|
||||
static const std::string UcFirst(std::string s);
|
||||
static std::string <rim(std::string &str, const std::string &chars = "\t\n\v\f\r ");
|
||||
static std::string &RTrim(std::string &str, const std::string &chars = "\t\n\v\f\r ");
|
||||
static const std::string UcFirst(const std::string& s);
|
||||
static std::string <rim(std::string &str, std::string_view chars = "\t\n\v\f\r ");
|
||||
static std::string &RTrim(std::string &str, std::string_view chars = "\t\n\v\f\r ");
|
||||
static std::string &Trim(std::string &str, const std::string &chars = "\t\n\v\f\r ");
|
||||
static std::string Commify(const std::string &number);
|
||||
static std::string Commify(uint16 number) { return Strings::Commify(std::to_string(number)); };
|
||||
@@ -107,10 +107,10 @@ public:
|
||||
static std::string Commify(int16 number) { return Strings::Commify(std::to_string(number)); };
|
||||
static std::string Commify(int32 number) { return Strings::Commify(std::to_string(number)); };
|
||||
static std::string Commify(int64 number) { return Strings::Commify(std::to_string(number)); };
|
||||
static std::string ConvertToDigit(int n, std::string suffix);
|
||||
static std::string ConvertToDigit(int n, const std::string& suffix);
|
||||
static std::string Escape(const std::string &s);
|
||||
static std::string GetBetween(const std::string &s, std::string start_delim, std::string stop_delim);
|
||||
static std::string Implode(std::string glue, std::vector<std::string> src);
|
||||
static std::string Implode(const std::string& glue, std::vector<std::string> src);
|
||||
static std::string Join(const std::vector<std::string> &ar, const std::string &delim);
|
||||
static std::string Join(const std::vector<uint32_t> &ar, const std::string &delim);
|
||||
static std::string MillisecondsToTime(int duration);
|
||||
@@ -122,10 +122,10 @@ public:
|
||||
static std::string::size_type SearchDelim(const std::string &haystack, const std::string &needle, const char deliminator = ',');
|
||||
static std::vector<std::string> Split(const std::string &s, const char delim = ',');
|
||||
static std::vector<std::string> Split(const std::string& s, const std::string& delimiter);
|
||||
static std::vector<std::string> Wrap(std::vector<std::string> &src, std::string character);
|
||||
static std::vector<std::string> Wrap(std::vector<std::string> &src, const std::string& character);
|
||||
static void FindReplace(std::string &string_subject, const std::string &search_string, const std::string &replace_string);
|
||||
static uint32 TimeToSeconds(std::string time_string);
|
||||
static bool ToBool(std::string bool_string);
|
||||
static bool ToBool(const std::string& bool_string);
|
||||
static inline bool EqualFold(const std::string &string_one, const std::string &string_two) { return strcasecmp(string_one.c_str(), string_two.c_str()) == 0; }
|
||||
static std::string Random(size_t length);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user