Initial commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
#ifndef STRINGALGORITHM_H
|
||||
#define STRINGALGORITHM_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace Utilities {
|
||||
namespace Internal {
|
||||
|
||||
size_t find_nth(const std::string& haystack, size_t pos, const std::string& needle, size_t nth);
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
bool equals(const std::string& str1, const std::string& str2);
|
||||
bool iequals(const std::string& str1, const std::string& str2);
|
||||
|
||||
bool starts_with(const std::string& subject, const std::string& string);
|
||||
bool istarts_with(const std::string& subject, const std::string& string);
|
||||
|
||||
std::vector<std::string> split(const std::string& subject, const char& delimiter);
|
||||
std::vector<std::string> split(const std::string& subject, const std::string delimiters);
|
||||
|
||||
void erase_all(std::string& subject, const char& item);
|
||||
|
||||
bool contains(const std::string& subject, const std::string& find);
|
||||
bool icontains(const std::string& subject, const std::string& find);
|
||||
|
||||
std::string::const_iterator find_nth(const std::string& haystack, const std::string& needle, size_t nth);
|
||||
|
||||
} // namespace Utilities
|
||||
|
||||
#endif // STRINGALGORITHM_H
|
||||
Reference in New Issue
Block a user