Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public String bubblifyText(String tweet){
- int indexForSplitOne = tweet.length() / 3;
- int indexForSplitTwo = indexForSplitOne * 2;
- while(tweet.charAt(indexForSplitOne) != ' ')
- {
- indexForSplitOne++;
- }
- while(tweet.charAt(indexForSplitTwo) != ' ')
- {
- indexForSplitTwo++;
- }
- String bubbleTweet = tweet.substring(0, indexForSplitOne - 1) + '\n' + tweet.substring(indexForSplitOne, indexForSplitTwo) + '\n' + tweet.substring(indexForSplitTwo);
- return bubbleTweet;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement