diff options
| author | Mat M <mathew1800@gmail.com> | 2016-12-19 15:45:21 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-19 15:45:21 -0500 |
| commit | 4e405010a3601b0cad032da1fec6308732a8c52a (patch) | |
| tree | 1ab36752bd97531088efeb723a78cfdd3dc7debe /Source/Core/Common/StringUtil.cpp | |
| parent | b9dc73d9cdaa4f660ab5293ed0322d0849020dc4 (diff) | |
| parent | a6114bad34f85eae346d2c7eec8d2f35c1728cf9 (diff) | |
Merge pull request #4497 from sepalani/totaldb.csv
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) |
