$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
 
Home | FAQ | News | Intro | Samples | Tutorial | Reference | Software
Developer's Notes | Licensing | Authors | Pikt-Users | Pikt-Workers | Related Projects | Site Index | Privacy Policy | Contact Us
Page best viewed at 1024x768 or greater.   Page last updated 2019-01-12.   This site is PIKT® powered.
Copyright © 1998-2019 Robert Osterlund. All rights reserved.
Home FAQ News Intro Samples Tutorial Reference Software
PIKT Logo
PIKT Page Title
Learn about the
rkey
program