Gentee Programming Language > Documentation > Libraries | Download documentation |
The spattern type is used to search through the string for another string. Before search start-up, call the spattern.init method in order to initialize the search pattern.
uint spattern.search( str src, uint offset )
src String where the specified string will be searched (search pattern). offset Offset where the search must be started or proceeded.
The offset of the found fragment. If the offset is equal to string size,no fragment is found.
spattern sp str src = "This is a test string." ... sp.init( "test", 0 ) if sp.search( src, 0 ) < *src { print("The pattern has been found in the source string!\n") }
See also
![]() |
![]() Copyright © 2004-2006 Gentee Inc. All rights reserved. ![]() |