login

strrep.gsf

Top / GrADS / script / strrep.gsf

Japanese / English

Name

strrep() - Replace string with other one.

Synopsis

ret = strrep( str, org, rep )

Options and Return values

str
Input string.
org
Target string.
rep
New string.
ret
New str in which org is replaced with rep.

Examples

(1) Explanation of example.

  • test.gs
    rc = gsfallow( 'on' )
    str = 'This is a pen.'
    say strrep( str, 'is', 'was' )
    
  • console
    ga-> test
    Thwas was a pen.
    

Script source code