summaryrefslogtreecommitdiff
path: root/include/tgbot/tools/StringTools.h
diff options
context:
space:
mode:
authorOleg Morozenkov <o.morozenkov@corp.mail.ru>2022-11-01 19:43:42 +0300
committerOleg Morozenkov <o.morozenkov@corp.mail.ru>2022-11-01 19:43:42 +0300
commite96d3a3d4f023dc0d5d4e60fb8efb5a40ce7a71d (patch)
treef57f44b1448204120229bd83f3654b32e3df79ed /include/tgbot/tools/StringTools.h
parent30136601c6755e5d7c2174ebd4ed49595e10a54b (diff)
parent7abb2509b87ef1344da97ae734211715f291cfa2 (diff)
Merge remote-tracking branch 'llnulldisk/master' into merge-228
Diffstat (limited to 'include/tgbot/tools/StringTools.h')
-rw-r--r--include/tgbot/tools/StringTools.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/tgbot/tools/StringTools.h b/include/tgbot/tools/StringTools.h
index fa3a2f5..a833fc2 100644
--- a/include/tgbot/tools/StringTools.h
+++ b/include/tgbot/tools/StringTools.h
@@ -63,6 +63,15 @@ TGBOT_API
std::string urlDecode(const std::string& value);
/**
+ * Escapes a string with illegal characters ("\/) for json
+ *
+ * @param value input string
+ *
+ * @return An encoded string
+ */
+std::string escapeJsonString(const std::string& value);
+
+/**
* Splits string to smaller substrings which have between them a delimiter. Resulting substrings won't have delimiter.
* @param str Source string
* @param delimiter Delimiter