$replace()

DESCRIPTION
    in a string, replace characters beginning at a specified index position
    with another string
SYNOPSIS
    $replace(s1,s2,i1,i2)
ARGUMENTS
    s1 - a quoted string, or string expression
    s2 - a quoted string, or string expression
    i1 - a positive integer, or integer expression, greater than or equal to one
    i2 - a positive integer, or integer expression, greater than or equal to zero
EXAMPLES
# pikt +C 'output $replace("all hell broke loose","ck",7,2)'
all heck broke loose
# pikt +C 'output $replace("what is the meaning of this?","",9,15)'
what is this?
# pikt +C 'output $replace("your chances are slim to none","second",18,4)'
your chances are second to none

# pikt +C 'output $replace("your chances are slim to none","second",6,6)'
your seconds are slim to none

# pikt +C 'output $replace("your chances are slim to none","second",1,21)'
second to none
SEE ALSO
    $substitute()

    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
View sample
iptables firewall
script config file