The wasChgWord function changes a word by index in sequence of token-delimited words and returns the resulting sequence.

For example:

Say wasChgWord('Search/For/Me', 3, 'Food', '/')

will output: Search/For/Food


/*    Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3    */
wasChgWord: procedure /* Change a word in a token delimited string.      */
    Parse ARG String,Index,Replace,Token
    If String = '' Then Return ''
    Parse VAR String Head Interpret(Token) Tail
    Look = wasChgWord(Tail,Index - 1,Replace,Token)
    If Index = 1 Then Head = Replace
    If Look ~= '' Then Return Head || Token || Look
Return Head

fuss/amiga/arexx/token_delimited_words/chgword.txt ยท Last modified: 2022/04/19 09:28 (external edit)

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key

For the copyright, license, warranty and privacy terms for the usage of this website please see the license, privacy, copyright and the plagiarism pages.