From bf435a79408d89072f5872ab98449949a8a077b0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 3 Feb 2012 15:53:55 +0300 Subject: Add own translation system. --- src/utils/stringutils.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/utils/stringutils.cpp') diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp index 16542526f..becb2124d 100644 --- a/src/utils/stringutils.cpp +++ b/src/utils/stringutils.cpp @@ -592,3 +592,10 @@ std::string &removeProtocol(std::string &url) url = url.substr(i + 3); return url; } + +bool strStartWith(std::string str1, std::string str2) +{ + if (str1.size() < str2.size()) + return false; + return str1.substr(0, str2.size()) == str2; +} -- cgit v1.2.3-70-g09d2