Difference between revisions of "Category:Token Identifiers"

From Scriptwiki
Jump to: navigation, search
 
(added some examples)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
+
== Definition ==
 +
Tokens are strings of characters that are separated by a certain character.
  
 +
Tokens are a very useful way to handle strings of text from which you need to separate shorter strings that are separated by a character. Usually the separating character (delimiter) is a space.
 +
 +
'''Note''' that token strings can be anything, and you could delimiter them with every character that exist (but only '''one''' character).
 +
 +
== What are they good for ==
 +
 +
In a line like ''This is just a little line'' each word represents a token if you separate them with a space. The space in this case is called the 'delimiter'.
 +
 +
If you want to, for example, get the third and fourth word from the above line, you could do it with [[$gettok]] and by using space as the delimiter. If you have a line like ''My brothers are called Bob, David, Elton, Joe, Jack, Tim'' you could get the names of the third and fourth brother easily with token idenfifiers. Without token identifiers it would be painful to find the names automatically.
 +
 +
 +
== Appearance in mIRC ==
 +
You will see tokens in three categories:
 +
*[[:Category:Events|Events]] ([[$1-]], [[$0]], etc.)
 +
*[[Tokenize|/tokenize]]
 +
*Token Identifiers
 +
 +
 
[[Category:Identifiers]]
 
[[Category:Identifiers]]

Latest revision as of 23:03, 3 May 2007

Definition

Tokens are strings of characters that are separated by a certain character.

Tokens are a very useful way to handle strings of text from which you need to separate shorter strings that are separated by a character. Usually the separating character (delimiter) is a space.

Note that token strings can be anything, and you could delimiter them with every character that exist (but only one character).

What are they good for

In a line like This is just a little line each word represents a token if you separate them with a space. The space in this case is called the 'delimiter'.

If you want to, for example, get the third and fourth word from the above line, you could do it with $gettok and by using space as the delimiter. If you have a line like My brothers are called Bob, David, Elton, Joe, Jack, Tim you could get the names of the third and fourth brother easily with token idenfifiers. Without token identifiers it would be painful to find the names automatically.


Appearance in mIRC

You will see tokens in three categories:

Pages in category "Token Identifiers"

The following 22 pages are in this category, out of 22 total.