/
ColdC/Functions/
ColdC/Structure/
<head><title>ColdC: Function/Method Reference: explode()</title></head>

<body>

<h1 align=center><a href="/ColdC/">ColdC</a>: <a href="/ColdC/Functions/">Function/Method Reference</a>: explode()</h1>

<hr>

<p>
<font size=+1><i>LIST</i> <b>explode</b>(<i>STRING <b>str</b>[, STRING <b>sep</b>[, INTEGER <b>want-blanks</b>]]</i>)</font>

<p>This function breaks <var>string</var> into a list of strings, using the
string <var>sep</var> as delimiters.  If <var>sep</var> is unspecified
it uses spaces as delimiters.  If <var>want-blanks</var> is specified and is
true <code>explode()</code> will include zero-length strings in the final
list, otherwise it will not.

<p>Examples:
<blockquote>
<PRE>
explode(" foo  bar baz")
=&gt; ["foo", "bar", "baz"]

explode("foo:bar:baz", ":")
=&gt; ["foo", "bar", "baz"]
</PRE>
</blockquote>

<p><hr size=4><p align=center><i>Last Modified on 24 Mar 1996</i>
<br><i>Copyright &copy; 1995, 1996, Brandon Gillespie</i>
</body>