$left()
DESCRIPTION
returns the specified left-most characters in a string
SYNOPSIS
$left(s,i)
ARGUMENTS
s - a quoted string, or string expression
i - a positive integer, or integer expression
EXAMPLES
# pikt +C 'output $left("out in the cold",3)'
out
notlogmsg ( #inputlength()
&& ($left($inline,3) !~ "=months")
)
rule // strip any [ or ]
if $left($proc, 1) eq "["
set $proc = $mid($proc, 2)
=chomp($proc, "]")
fi
rule
if #length($password) == 0
&& $left($user,1) ne "+"
output mail "User $user has NO PASSWORD!"
endif
rule // bypass all but "^<" or "^>" lines
if "<>" !~ $left($inlin,1)
next
fi
rule
if $left($filename,1) eq "/"
set $filename = $basename($filename)
fi
SEE ALSO
$right()
$chop()
$middle(), $substring()
$ltrim()
$rtrim()
$trim()
String Functions
Numerical Functions