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

m
Line 1: Line 1:
{{mirc title|$left Identifier}}
+
{{mirc title|$left Identifier}}'''$left''' is a {{mIRC|string manipulation}} identifier used to return characters from the left side of a string.
'''$left''' is a {{mIRC|string manipulation}} identifier used to return characters from the left side of a string.
+
 
  
 
== Synopsis ==
 
== Synopsis ==
Line 28: Line 28:
  
  
== See Also ==
+
== See also ==
 
* {{mIRC|string manipulation}}
 
* {{mIRC|string manipulation}}
 
* {{mIRC|$right}}
 
* {{mIRC|$right}}
 
* {{mIRC|$mid}}
 
* {{mIRC|$mid}}
 +
{{mIRC identifier list}}
  
 
+
[[Category:mIRC identifiers|left]]
 
 
[[Category:MIRC identifiers]]
 

Revision as of 17:13, 20 September 2017

$left is a string manipulation identifier used to return characters from the left side of a string.


Synopsis

$left(<string>, <length>)

Parameters

<string>The string to manipulate

<length>The length or number of characters to remove from the original string. <length> can be a positive or negative. It cannot be 0.


If the length provided is positive, $left will return the <length> characters from the left of the string.

$left(abcdefg, 4)
; abcd

If the length provided is negative, $left will return the characters in the string minus <length> on the right.

$left(abcdefg, -3)
; abcde

More Examples

$left(appleseed, -4)
; apple
$left([AB]BotName, 4)
; [AB]


See also

[Expand]
v · d · e mIRC identifier list