From WikiChip
Difference between revisions of "mirc/identifiers/$left"
m (PatrolBot moved page $left identifier - mIRC to mirc/identifiers/$left: per new naming convention) |
m (→See Also: link fix) |
||
Line 29: | Line 29: | ||
== See Also == | == See Also == | ||
− | * {{mIRC| | + | * {{mIRC|string manipulation}} |
* {{mIRC|$right}} | * {{mIRC|$right}} | ||
* {{mIRC|$mid}} | * {{mIRC|$mid}} |
Revision as of 06:53, 28 December 2014
Template:mIRC Guide $left is a string manipulation identifier used to return characters from the left side of a string.
Contents
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]