libmrbesen/inc/util.h

19 lines
501 B
C
Raw Normal View History

2020-09-28 23:49:14 +02:00
#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);
2020-09-29 14:12:41 +02:00
void toLower(const std::string& in, std::string& out); //copy toLower
void toLower(std::string& in); //inplace toLower
2020-09-29 14:04:19 +02:00
2020-09-29 15:12:46 +02:00
bool endsWith(const std::string& str, const std::string& ending);
bool startsWith(const std::string& str, const std::string& start);
2020-09-28 23:49:14 +02:00
}