Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-release > by-pkgid > 6b3585ea67ce3e79c9049b5b33294cdd > files > 656

docbook-style-dsssl-doc-1.79-16.mga7.noarch.rpm

<RefEntry id="match-split-string-list">
<!-- This file is generated automatically from the DSSSL source. -->
<!-- Do not edit this file! -->
<?html-filename match-split-string-list.html>

<RefMeta>
  <RefEntryTitle>match-split-string-list</RefEntryTitle>
  <RefMiscInfo Role="file">dblib.dsl</RefMiscInfo>
</RefMeta>

<RefNameDiv>
  <RefName>match-split-string-list</RefName>
  <RefPurpose>Splits each string in a list of strings and returns the concatenated result list</RefPurpose>
</RefNameDiv>

<RefSynopsisDiv><Title>Synopsis</Title>
<Synopsis>
(match-split-string-list string-list target)
</Synopsis>
</RefSynopsisDiv>

<RefSect1><Title>Description</Title>

<para>
Splits each string in <literal>string-list</literal> at <literal>target</literal> with <literal>(match-split)</literal>,
concatenates the results, and returns a single list of tokens.
</para>
<variablelist>
<varlistentry><term>string-list</term>
<listitem>
<para>
The list of strings to split.
</para>
</listitem>
</varlistentry>
<varlistentry><term>target</term>
<listitem>
<para>
The string which is a delimiter between tokens.
</para>
</listitem>
</varlistentry>
</variablelist>

</RefSect1>

<RefSect1><Title>Author</Title>

<para>
Norman Walsh, &lt;ndw@nwalsh.com&gt;
</para>
</RefSect1>
<RefSect1><Title>Source Code</Title>

<ProgramListing>
(define (match-split-string-list string-list target)
  ;; Splits each string in a list of strings and returns the concatenated result list
  (let loop ((result '()) (sl string-list))
    (if (null? sl)
	result
	(loop (append result (match-split (car sl) target))
	      (cdr sl)))))
</ProgramListing>
</RefSect1>

</RefEntry>