Home

News

International

Screen Shots

Documentation

Download

Build

License

Credits

Contact

SourceForge Project

Tintware Documentation : Tint Programming Language : Tint Reference : Strings : string.match

Syntax

#(%string.match,%match)
#(%string.match,%match,%notfound)
#(%string.match,%match,%notfound,%nocase)

%string is any string. %match is used to find a match in the string. %notfound is what should be returned if a match is not found in the string. If %nocase is specified, then the match ignores case.

Starting from the offset, the string is searched for %match. If a match is found, all of the characters from the offset to just before the beginning of the match are returned, and the offset is set to just after the match. If no match is found, and %notfound was specified, then it will be returned active.

Example

#(def,a-string,aa.b..ddd.eeeeffff)

#(a-string.match,.)
aa
#(a-string.match,.)
b
#(a-string.match,.)

#(a-string.match,.)
ddd
#(a-string.match,.)

#(a-string)
eeeeffff
#(a-string.match,.,not found)
not found
#(a-string.match,F,not found)
not found
#(a-string.match,F,not found,y)
eeee
#(a-string.match,.,(#(a-string.get-n,200)))
fff