Stop formatting nonsense
This commit is contained in:
parent
cbfd650f78
commit
f283a52540
@ -104,7 +104,7 @@ namespace Utils
|
|||||||
}
|
}
|
||||||
|
|
||||||
// trim from start
|
// trim from start
|
||||||
std::string <rim(std::string &s)
|
std::string& LTrim(std::string& s)
|
||||||
{
|
{
|
||||||
s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int val)
|
s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int val)
|
||||||
{
|
{
|
||||||
@ -114,7 +114,7 @@ namespace Utils
|
|||||||
}
|
}
|
||||||
|
|
||||||
// trim from end
|
// trim from end
|
||||||
std::string &RTrim(std::string &s)
|
std::string& RTrim(std::string& s)
|
||||||
{
|
{
|
||||||
s.erase(std::find_if(s.rbegin(), s.rend(), [](int val)
|
s.erase(std::find_if(s.rbegin(), s.rend(), [](int val)
|
||||||
{
|
{
|
||||||
@ -124,7 +124,7 @@ namespace Utils
|
|||||||
}
|
}
|
||||||
|
|
||||||
// trim from both ends
|
// trim from both ends
|
||||||
std::string &Trim(std::string &s)
|
std::string& Trim(std::string& s)
|
||||||
{
|
{
|
||||||
return LTrim(RTrim(s));
|
return LTrim(RTrim(s));
|
||||||
}
|
}
|
||||||
|
@ -81,9 +81,9 @@ namespace Utils
|
|||||||
std::vector<std::string> Split(const std::string& str, const char delim);
|
std::vector<std::string> Split(const std::string& str, const char delim);
|
||||||
void Replace(std::string &string, const std::string& find, const std::string& replace);
|
void Replace(std::string &string, const std::string& find, const std::string& replace);
|
||||||
bool StartsWith(const std::string& haystack, const std::string& needle);
|
bool StartsWith(const std::string& haystack, const std::string& needle);
|
||||||
std::string <rim(std::string &s);
|
std::string& LTrim(std::string& s);
|
||||||
std::string &RTrim(std::string &s);
|
std::string& RTrim(std::string& s);
|
||||||
std::string &Trim(std::string &s);
|
std::string& Trim(std::string& s);
|
||||||
|
|
||||||
std::string FormatTimeSpan(int milliseconds);
|
std::string FormatTimeSpan(int milliseconds);
|
||||||
std::string FormatBandwidth(size_t bytes, int milliseconds);
|
std::string FormatBandwidth(size_t bytes, int milliseconds);
|
||||||
|
Loading…
Reference in New Issue
Block a user