xHarbour Reference Documentation > Function Reference |
Sets the search mode for At***() functions
SetAtLike( [<nNewMode>], [<cWildCard>] ) --> nOldMode
Search modes for At***() functions
Value | Description |
---|---|
0 | Searches exact match of search string |
1 | Search string may contain wild card characters |
The function returns the previous SetAtAlike() mode as a numeric value.
See also: | AfterAtNum(), AtAdjust(), AtNum(), AtRepl(), BeforAtNum(), NumAt(), StrDiff() |
Category: | CT:String manipulation , Character functions |
Source: | ct\ctstr.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example uses function AtNum() to demonstrate wild card // matching with SetAtLike(). PROCEDURE Main LOCAL cStr := "Hello, Mister Miller" LOCAL nPos ? nPos := AtNum( "Miller", cStr ) // result: 15 ? nPos := AtNum( "Mi??er", cStr ) // result: 0 SetAtLike( 1 ) ? nPos := AtNum( "Mi??er", cStr ) // result: 15 ? SubStr( cStr, nPos ) // result: Miller ? nPos := AtNum( "Mi??er", cStr, 1 ) // result: 8 ? SubStr( cStr, nPos ) // result: Mister Miller RETURN
http://www.xHarbour.com