About

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

Code

/*************************************************************************/
/*    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 08:28 by 127.0.0.1

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


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