<RefEntry id="repl-substring-list"> <!-- This file is generated automatically from the DSSSL source. --> <!-- Do not edit this file! --> <?html-filename repl-substring-list.html> <RefMeta> <RefEntryTitle>repl-substring-list</RefEntryTitle> <RefMiscInfo Role="file">dblib.dsl</RefMiscInfo> </RefMeta> <RefNameDiv> <RefName>repl-substring-list</RefName> <RefPurpose>Replace the first target in the replacement list that matches</RefPurpose> </RefNameDiv> <RefSynopsisDiv><Title>Synopsis</Title> <Synopsis> (repl-substring-list string replace-list pos) </Synopsis> </RefSynopsisDiv> <RefSect1><Title>Description</Title> <para> Replaces the first target in <literal>replace-list</literal> that matches in <literal>string</literal> at <literal>pos</literal> with its replacement. See also <literal>repl-substring-list?</literal>.</para> </RefSect1> <RefSect1><Title>Author</Title> <para> Norman Walsh, <ndw@nwalsh.com> </para> </RefSect1> <RefSect1><Title>Source Code</Title> <ProgramListing> (define (repl-substring-list string replace-list pos) ;; Replace the first target in the replacement list that matches (if (repl-substring-list? string replace-list pos) (let ((target (repl-substring-list-target string replace-list pos)) (repl (repl-substring-list-repl string replace-list pos))) (repl-substring string target repl pos)) string)) </ProgramListing> </RefSect1> </RefEntry>