<RefEntry id="repl-substring-list-target"> <!-- This file is generated automatically from the DSSSL source. --> <!-- Do not edit this file! --> <?html-filename repl-substring-list-target.html> <RefMeta> <RefEntryTitle>repl-substring-list-target</RefEntryTitle> <RefMiscInfo Role="file">dblib.dsl</RefMiscInfo> </RefMeta> <RefNameDiv> <RefName>repl-substring-list-target</RefName> <RefPurpose>Return the target that matches in a string</RefPurpose> </RefNameDiv> <RefSynopsisDiv><Title>Synopsis</Title> <Synopsis> (repl-substring-list-target string replace-list pos) </Synopsis> </RefSynopsisDiv> <RefSect1><Title>Description</Title> <para> Returns the target in <literal>replace-list</literal> that matches in <literal>string</literal> at <literal>pos</literal> 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-target string replace-list pos) ;; Return the target that matches in a string (let loop ((list replace-list)) (let ((target (car list)) (repl (car (cdr list))) (rest (cdr (cdr list)))) (if (repl-substring? string target pos) target (if (null? rest) #f (loop rest)))))) </ProgramListing> </RefSect1> </RefEntry>