View Single Post
  #49  
Old 02-05-2014, 10:47 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Quote:
Originally Posted by Torankusu View Post
obj.tokenize([delimiters]) - splits the string into an array wherever the delimiters occur

Example:
Player chats: "This is an example"

PHP Code:
player.chat.tokenize(" "); //uses spaces as separator 
Can access tokens like this:
tokenscount (will yield 4)
tokens[0] will reference the first token (the word "this").
Similarly,
tokens[2] will reference the word "an".
ps: if its only for spaces, you could also just do player.chat.tokenize()
__________________
MEEP!
Reply With Quote