Rightmost characters of a longstring
Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Lstr_Right function is the Right (String function).
The $Lstr_Right function accepts three arguments and returns a string result.
The first argument is an arbitrary string or longstring. This is a required argument.
The second argument is a number between 1 and 2**31-1 that indicates the result length. This is a required argument.
<section begin="syntax" />%RESULT = $Lstr_Right(longstring, len, pad) <section end="syntax" />
$Lstr_Right acts very much like $PAD except
- The target length and pad character arguments are reversed.
- It cancels the request if the result target is too short to hold the result.
- It cancels the request if the pad character argument is longer than one byte.
- It can operate on LONGSTRING inputs.
- It produces a LONGSTRING output.
%BIG = $Lstr_Right('McGonagall', 3)
sets %BIG to "all&CQ. and
%BIG = $Lstr_Right('Dumbledore', 300, '?')
sets %BIG to 290 question marks followed by "Dumbledore&CQ..
$Lstr_Right is only available in Sirius Mods Version 6.2 and later.