ColdC: Function/Method Reference: match_begin()


INTEGER match_begin(STRING str, STRING search[, STRING sep])

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

Examples:

match_begin("foo:bar:baz", "fo", ":")
=> 1

match_begin("foo bar baz", "ar")
=> 0


Last Modified on 24 Mar 1996
Copyright © 1995, 1996, Brandon Gillespie