View Single Post
  #16  
Old 04-06-2010, 06:25 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by Stefan View Post
Wondering if someone could write a script which counts the number of smilies in a text?
PHP Code:
function countAnimations(text) {
  
temp.anismilies = {":cry:",":confused:",":asleep:","!pissed!",":spam:",":rolleyes:",":p"}; 
  for (
temp.atemp.anismilies) {
    
temp.count += text.positions(temp.a).size(); 
  }
  return 
temp.count;

__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote