About

The wasSubWord function finds a sub-word by index within a sequence of token-delimited characters and returns it.

For example:

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

will output: For

Code

/*************************************************************************/
/*    Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3    */
/*************************************************************************/
wasSubWord: procedure /* Returns a sub-word delimited by a token.        */
    Parse ARG String,Index,Token
    If Index = 0 Then Return ''
    Parse VAR String Head Interpret(Token) Tail
    If Index = 1 Then Return Head
Return wasSubWord(Tail,Index - 1,Token)

fuss/amiga/arexx/token_delimited_words/subword.txt ยท Last modified: 2017/02/22 18:30 (external edit)

Access website using Tor Access website using i2p


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