The wasDelWord function deletes a word by index in a sequence of token-delimited words and returns the resulting modified sequence.

For example:

Say wasDelWord('Search/For/Me', 2, '/')

will output: Search/Me


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

fuss/amiga/arexx/token_delimited_words/delword.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.