summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/SkypeWeb/src/skype_utils.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_utils.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp
index bfc4cc3bdd..7417673315 100644
--- a/protocols/SkypeWeb/src/skype_utils.cpp
+++ b/protocols/SkypeWeb/src/skype_utils.cpp
@@ -539,6 +539,19 @@ CMStringA CSkypeProto::ParseUrl(const char *url, const char *token)
return CMStringA(start, end - start);
}
+CMStringA CSkypeProto::GetStringChunk(const char *haystack, const char *start, const char *end)
+{
+ const char *sstart = strstr(haystack, start);
+ if (sstart == NULL)
+ return CMStringA();
+
+ sstart = sstart + mir_strlen(start);
+ const char *send = strstr(sstart, end);
+ if (send == NULL)
+ return CMStringA(sstart);
+ return CMStringA(sstart, send - sstart);
+}
+
CMStringA CSkypeProto::ContactUrlToName(const char *url)
{
return ParseUrl(url, "/8:");