$chop()
DESCRIPTION
returns a string with a specified number of characters chopped off the end
or:
returns string a minus its last character
SYNOPSIS
$chop(s,i)
or:
$chop(s)
ARGUMENTS
s - a quoted string, or string expression
i - an integer greater than or equal to zero
or:
s - a quoted string, or string expression
EXAMPLES
# pikt +C 'output $chop("Off with his head!",5)'
Off with his
# pikt +C 'output $chop("Chop-O-Matic")'
Chop-O-Mati
chop(S) // like Perl's chop, chop the last char off of string S
set (S) = $chop((S))
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 // dispose of trailing comma, and set value
set #la1 = #value($chop($a1,1))
SEE ALSO
$chop()
$middle(), $substring()
$left()
$right()
$ltrim()
$rtrim()
$trim()
String Functions
Numerical Functions