From WikiChip
Difference between revisions of "mirc/identifiers/$len"
< mirc‎ | identifiers

(Example)
Line 1: Line 1:
  
  
{{mirc title|$len Identifier}}'''$len(text)''' Returns the length of text.
+
{{mirc title|$len Identifier}}'''$len(text)''' returns the number of characters in the text
  
 
== Synopsis ==
 
== Synopsis ==
Line 9: Line 9:
 
== Paramters ==
 
== Paramters ==
  
'''Text''' = ''Will be the given text that you want to use for.''
+
'''Text''' = The input string you want to know the lenght of
  
 
== Properties ==
 
== Properties ==
Line 18: Line 18:
 
<source lang="mIRC">//echo -a $len(ONE)</source>
 
<source lang="mIRC">//echo -a $len(ONE)</source>
  
It will return '''3''' because it's the correct length of the text.
+
will return '''3'''
  
 
<source lang="mIRC">//echo -a $len(ONE TWO)</source>
 
<source lang="mIRC">//echo -a $len(ONE TWO)</source>
  
It will return '''7''' because it is counting all the text ASCII characters as the total legth of the text.
+
will return '''7'''
 
 
<source lang="mIRC">//echo -a $len(12345)</source>
 
 
 
It will return '''5''' because it can count and numbers included the text as the length of the text.
 
  
 
== Compatibility ==
 
== Compatibility ==

Revision as of 14:14, 12 June 2017


$len(text) returns the number of characters in the text

Synopsis

$len(text)

Paramters

Text = The input string you want to know the lenght of

Properties

None

Example

//echo -a $len(ONE)

will return 3

//echo -a $len(ONE TWO)

will return 7

Compatibility

Added: mIRC v4.5
Added on: 30 Jun 1996
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See Also