20 lines
679 B
C++
20 lines
679 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
namespace mrbesen::Util {
|
|
|
|
unsigned int count(const std::string& str, char c); //count occurances of c in str
|
|
|
|
bool equalsIgnoreCase(const std::string& a, const std::string& b, size_t max = std::string::npos);
|
|
|
|
void toLower(const std::string& in, std::string& out); //copy toLower
|
|
void toLower(std::string& in); //inplace toLower
|
|
|
|
bool endsWith(const std::string& str, const std::string& ending);
|
|
bool startsWith(const std::string& str, const std::string& start);
|
|
|
|
bool removeEnd(std::string& str, const std::string& ending); //returns true on change (ending = "" -> returns false)
|
|
bool removeStart(std::string& str, const std::string& start);
|
|
|
|
} |