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

<body>

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

<hr>

<p>
<font size=+1><i>INTEGER</i> <b>match_begin</b>(<i>STRING <b>str</b>, STRING <b>search</b>[, STRING <b>sep</b>]</i>)</font>

<p>This function looks for the string <VAR>search</VAR> at the beginning
of each word in <VAR>str</VAR>.  The word separator is given by the string
<VAR>sep</VAR> if it is specified; otherwise, a space (<CODE>" "</CODE>)
is used.  The return value of <CODE>match_begin()</CODE> is <CODE>1</CODE> if
<VAR>search</VAR> was found at the beginning of a word in <VAR>string</VAR>,
or <CODE>0</CODE> if not.

<P>Examples:

<blockquote>
<PRE>
match_begin("foo:bar:baz", "fo", ":")
=&gt; 1

match_begin("foo bar baz", "ar")
=&gt; 0
</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>