summaryrefslogtreecommitdiff
path: root/src/utils/stringutils.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-12-17 18:34:43 +0300
committerAndrei Karas <akaras@inbox.ru>2013-12-17 18:34:43 +0300
commitd39d82b4fb368d5ae80c16c5b6709f276b4b96b0 (patch)
tree810617fc3a54b2b1dd21815b59b23eaec6495015 /src/utils/stringutils.h
parentf08d1cf0131fbfa10950e7f67bab7f1f5b1736ae (diff)
downloadplus-d39d82b4fb368d5ae80c16c5b6709f276b4b96b0.tar.gz
plus-d39d82b4fb368d5ae80c16c5b6709f276b4b96b0.tar.bz2
plus-d39d82b4fb368d5ae80c16c5b6709f276b4b96b0.tar.xz
plus-d39d82b4fb368d5ae80c16c5b6709f276b4b96b0.zip
add restrict into stringutils.
Diffstat (limited to 'src/utils/stringutils.h')
-rw-r--r--src/utils/stringutils.h28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/utils/stringutils.h b/src/utils/stringutils.h
index 7f40b3673..37d744823 100644
--- a/src/utils/stringutils.h
+++ b/src/utils/stringutils.h
@@ -115,11 +115,11 @@ std::string strprintf(const char *const format, ...) A_WARN_UNUSED
*/
std::string removeColors(std::string msg) A_WARN_UNUSED;
-const std::string findSameSubstring(const std::string &str1,
- const std::string &str2);
+const std::string findSameSubstring(const std::string &restrict str1,
+ const std::string &restrict str2);
-const std::string findSameSubstringI(const std::string &str1,
- const std::string &str2);
+const std::string findSameSubstringI(const std::string &restrict str1,
+ const std::string &restrict str2);
/**
* Compares the two strings case-insensitively.
@@ -157,8 +157,8 @@ std::string getFileName(const std::string &path) A_WARN_UNUSED;
std::string getFileDir(const std::string &path) A_WARN_UNUSED;
-std::string& replaceAll(std::string& context, const std::string& from,
- const std::string& to);
+std::string& replaceAll(std::string& context, const std::string &restrict from,
+ const std::string &restrict to);
/**
* Returns a bool value depending on the given string value.
@@ -209,18 +209,22 @@ std::string stringToHexPath(const std::string &str) A_WARN_UNUSED;
void deleteCharLeft(std::string &str, unsigned *const pos);
-bool findLast(const std::string &str1, const std::string &str2) A_WARN_UNUSED;
+bool findLast(const std::string &restrict str1,
+ const std::string &restrict str2) A_WARN_UNUSED;
-bool findFirst(const std::string &str1, const std::string &str2) A_WARN_UNUSED;
+bool findFirst(const std::string &restrict str1,
+ const std::string &restrict str2) A_WARN_UNUSED;
-bool findCutLast(std::string &str1, const std::string &str2) A_WARN_UNUSED;
+bool findCutLast(std::string &restrict str1,
+ const std::string &restrict str2) A_WARN_UNUSED;
-bool findCutFirst(std::string &str1, const std::string &str2) A_WARN_UNUSED;
+bool findCutFirst(std::string &restrict str1,
+ const std::string &restrict str2) A_WARN_UNUSED;
std::string &removeProtocol(std::string &url);
-bool strStartWith(const std::string &str,
- const std::string &start) A_WARN_UNUSED;
+bool strStartWith(const std::string &restrict str,
+ const std::string &restrict start) A_WARN_UNUSED;
std::string getDateString() A_WARN_UNUSED;