How it works

The Instruction operation "right" returns a specified number of characters from the right side of the first input string. Subsequent inputs determine the number of characters "n".

If the specified number of characters is negative then the string returned is the original string with the specified number of characters removed from the beginning. Or another way to look at it is; that a "-n" right value, is in effect a positive "n" left value, so simple arithmetics.

"Right" Examples

Example 1: Positive "n"

The example below has the input value of 8, so it returns "ht-chars" as they are the first eight characters to the right.

<instruction operation="right">
	<input value="eight-chars" />
	<input value="8" />
</instruction>
ht-chars

Example 2: Negative "n"

The example below has the input value of -8, so it removes "eight-ch" and returns "ars". This is equivalent to a positive value of "3" for the left operation in our eleven letter string.

<instruction operation="right">
	<input value="eight-chars" />
	<input value="-8" />
</instruction>
ars



Last Modified: Thu, 15 Jan 2015