From e94c705bb01c662d934c0096480bc9a732d0e1ec Mon Sep 17 00:00:00 2001 From: watcherhd Date: Thu, 19 Jan 2012 12:21:27 +0000 Subject: FacebookRM: Version bump Version 0.0.7.0 + Support for group chats (EXPERIMENTAL!) - enable it in options ! Fixed loading contact list ! Fixed potential freeze. Total downloads: (None or statistics not available yet) Version 0.0.6.1a Reuploaded. Total downloads: (None or statistics not available yet) Version 0.0.6.1 + Returned option to close chat windows (on website) + New option to map non-standard statuses to Invisible (insetad of Online) + New option to load contacts, which have "On the Phone" status ! Fixed changing chat visibility ! Very long messages are no longer received duplicitely ! Changes and fixes related to multiuser messages and messages from people, which are not in server-list Total downloads: (None or statistics not available yet) git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@261 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb --- FacebookRM/utils.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'FacebookRM/utils.cpp') diff --git a/FacebookRM/utils.cpp b/FacebookRM/utils.cpp index 096f1fa..5d32091 100644 --- a/FacebookRM/utils.cpp +++ b/FacebookRM/utils.cpp @@ -215,6 +215,9 @@ std::string utils::text::remove_html( std::string data ) if ( data.at(i) == '<' && data.at(i+1) != ' ' ) { i = data.find( ">", i ); + if (i == std::string::npos) + break; + continue; } @@ -269,6 +272,21 @@ std::string utils::text::trim( std::string data ) return (begin != std::string::npos) ? data.substr( begin, end - begin ) : ""; } +void utils::text::explode(std::string str, std::string separator, std::vector* results){ + std::string::size_type pos; + pos = str.find_first_of(separator); + while(pos != std::string::npos){ + if(pos > 0){ + results->push_back(str.substr(0,pos)); + } + str = str.substr(pos+1); + pos = str.find_first_of(separator); + } + if(str.length() > 0){ + results->push_back(str); + } +} + std::string utils::text::source_get_value( std::string* data, unsigned int argument_count, ... ) { va_list arg; -- cgit v1.2.3