summaryrefslogtreecommitdiff
path: root/src/utils/stringutils.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-04-18 21:22:34 +0300
committerAndrei Karas <akaras@inbox.ru>2013-04-18 21:22:34 +0300
commit884c064f762c4d5ca23458ea43d9c34348259840 (patch)
tree47f51677c0cad3cdd9f94db43e4d9e72b221f904 /src/utils/stringutils.h
parent68a46feb0eb43663ff145fea3b2216ea79c8e36f (diff)
downloadplus-884c064f762c4d5ca23458ea43d9c34348259840.tar.gz
plus-884c064f762c4d5ca23458ea43d9c34348259840.tar.bz2
plus-884c064f762c4d5ca23458ea43d9c34348259840.tar.xz
plus-884c064f762c4d5ca23458ea43d9c34348259840.zip
improve stringutils file.
Diffstat (limited to 'src/utils/stringutils.h')
-rw-r--r--src/utils/stringutils.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/utils/stringutils.h b/src/utils/stringutils.h
index 9d1afe717..0f9599f03 100644
--- a/src/utils/stringutils.h
+++ b/src/utils/stringutils.h
@@ -149,9 +149,9 @@ const char* getSafeUtf8String(std::string text) A_WARN_UNUSED;
void getSafeUtf8String(std::string text, char *const buf);
-std::string getFileName(std::string path) A_WARN_UNUSED;
+std::string getFileName(const std::string &path) A_WARN_UNUSED;
-std::string getFileDir(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);
@@ -189,9 +189,10 @@ void splitToStringSet(std::set<std::string> &tokens,
void splitToIntVector(std::vector<int> &tokens,
const std::string &text, const char separator);
-std::string combineDye(std::string file, std::string dye) A_WARN_UNUSED;
+std::string combineDye(std::string file, const std::string &dye) A_WARN_UNUSED;
-std::string combineDye2(std::string file, std::string dye) A_WARN_UNUSED;
+std::string combineDye2(std::string file,
+ const std::string &dye) A_WARN_UNUSED;
std::string packList(const std::list<std::string> &list) A_WARN_UNUSED;
@@ -205,13 +206,14 @@ bool findLast(const std::string &str1, const std::string &str2) A_WARN_UNUSED;
bool findFirst(const std::string &str1, const std::string &str2) A_WARN_UNUSED;
-bool findCutLast(std::string &str1, std::string str2) A_WARN_UNUSED;
+bool findCutLast(std::string &str1, const std::string &str2) A_WARN_UNUSED;
-bool findCutFirst(std::string &str1, std::string str2) A_WARN_UNUSED;
+bool findCutFirst(std::string &str1, const std::string &str2) A_WARN_UNUSED;
std::string &removeProtocol(std::string &url);
-bool strStartWith(std::string str, std::string start) A_WARN_UNUSED;
+bool strStartWith(const std::string &str,
+ const std::string &start) A_WARN_UNUSED;
std::string getDateString() A_WARN_UNUSED;