Skip to content

Instantly share code, notes, and snippets.

@brunokruse
Created November 29, 2012 21:03
Show Gist options
  • Save brunokruse/4171904 to your computer and use it in GitHub Desktop.
Save brunokruse/4171904 to your computer and use it in GitHub Desktop.
TwitterSplitter
vector<string> hashtags;
string testTweet = "akjdf alsdkj #hashtag1 #hashtag2";
vector<string> words = ofSplitString(testTweet, " ");
for (int x = 0; x < words.size(); x++) {
if ( ofIsStringInString(words[x], "#")) {
hashtags.push_back(words[x]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment