diff options
| author | Sepalani <sepalani@hotmail.fr> | 2016-12-06 15:43:41 +0000 |
|---|---|---|
| committer | Sepalani <sepalani@hotmail.fr> | 2016-12-18 00:27:10 +0000 |
| commit | a6114bad34f85eae346d2c7eec8d2f35c1728cf9 (patch) | |
| tree | 4ddfb7c3801442ebdf9b011ccfceb2bb272b3735 /Source/Core/Common/StringUtil.cpp | |
| parent | f431b18675fc2df846a1d142c1d7a793bd1d1175 (diff) | |
Import/Export signature files as CSV
Diffstat (limited to 'Source/Core/Common/StringUtil.cpp')
| -rw-r--r-- | Source/Core/Common/StringUtil.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/Core/Common/StringUtil.cpp b/Source/Core/Common/StringUtil.cpp index 6f3567e782..95cc3b1586 100644 --- a/Source/Core/Common/StringUtil.cpp +++ b/Source/Core/Common/StringUtil.cpp @@ -373,6 +373,16 @@ std::string ReplaceAll(std::string result, const std::string& src, const std::st return result; } +bool StringBeginsWith(const std::string& str, const std::string& begin) +{ + return str.size() >= begin.size() && std::equal(begin.begin(), begin.end(), str.begin()); +} + +bool StringEndsWith(const std::string& str, const std::string& end) +{ + return str.size() >= end.size() && std::equal(end.rbegin(), end.rend(), str.rbegin()); +} + #ifdef _WIN32 std::string UTF16ToUTF8(const std::wstring& input) |
