diff options
author | George Hazan <george.hazan@gmail.com> | 2015-09-02 18:01:59 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-09-02 18:01:59 +0000 |
commit | b32bd0a340de47fda10fbca63c6cf664327533cf (patch) | |
tree | 1c3db0932c046d02232a58394ec420837adc51f1 /protocols/WhatsApp/src/utils.cpp | |
parent | dd0979e4c86c5e9ee51a6b659464aa9bfd28ec2a (diff) |
WhatsApp:
- added ability to send media files (patch by Cassio);
- fix for wrongly sent acks (patch by Cassio);
- project files cleaned up;
- version bump;
git-svn-id: http://svn.miranda-ng.org/main/trunk@15154 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/utils.cpp')
-rw-r--r-- | protocols/WhatsApp/src/utils.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/protocols/WhatsApp/src/utils.cpp b/protocols/WhatsApp/src/utils.cpp index 6d7e77b15a..4458f976f0 100644 --- a/protocols/WhatsApp/src/utils.cpp +++ b/protocols/WhatsApp/src/utils.cpp @@ -76,3 +76,20 @@ void md5_string(const std::string &data, BYTE digest[16]) {
utils::md5string(data, digest);
}
+
+std::vector<std::string> &split(const std::string &s, char delim, std::vector<std::string> &elems) {
+ std::stringstream ss(s);
+ std::string item;
+ while (std::getline(ss, item, delim)) {
+ if (item.length() > 0) {
+ elems.push_back(item);
+ }
+ }
+ return elems;
+}
+
+std::vector<std::string> split(const std::string &s, char delim) {
+ std::vector<std::string> elems;
+ split(s, delim, elems);
+ return elems;
+}
|