summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-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