summaryrefslogtreecommitdiff
path: root/FacebookRM/utils.cpp
diff options
context:
space:
mode:
authorwatcherhd <watcherhd@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2012-01-19 12:21:27 +0000
committerwatcherhd <watcherhd@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2012-01-19 12:21:27 +0000
commite94c705bb01c662d934c0096480bc9a732d0e1ec (patch)
treea07c6aa2174cf87d62ecfccdde8dbfa56185d78f /FacebookRM/utils.cpp
parent9b2d93c613db59b7d47327899a0850d370d6ea5e (diff)
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
Diffstat (limited to 'FacebookRM/utils.cpp')
-rw-r--r--FacebookRM/utils.cpp18
1 files changed, 18 insertions, 0 deletions
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<std::string>* 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;