$right()
DESCRIPTION
returns the specified right-most characters in a string
SYNOPSIS
$right(s,i)
ARGUMENTS
s - a quoted string, or string expression
i - a positive integer, or integer expression
EXAMPLES
# pikt +C 'output $right("a wrong",5)'
wrong
chomp(S, C) // sort of like Perl's chomp, chop the last char off of
// string S if it's a (C)
if $right((S),1) eq (C)
set (S) = $chop((S))
fi
rule // trim leading $ and set the dollar amount
set #dollars = #val($right($d,#length($d)-1))
rule // dispose of possible ending "*" in ident
if $right($ident,1) eq "\*"
set $ident2 = $chop($ident)
else
set $ident2 = $ident
endif
set_datestamp // set $datestamp = "991215", for example
set $datestamp = $right($text(#year()),2) .
$if(#month()<10, "0", "") . $text(#month()) .
$if(#day()<10, "0", "") . $text(#day())
SEE ALSO
$left()
$chop()
$middle(), $substring()
$ltrim()
$rtrim()
$trim()
String Functions
Numerical Functions