vl-string-search (AutoLISP)

Searches for the specified pattern in a string

Supported Platforms: Windows and Mac OS

Signature

(vl-string-search pattern str [start-pos])
pattern

Type: String

The textual value containing the pattern to be searched for.

str

Type: String

The textual value to be searched for pattern.

start-pos

Type: Integer

A numeric value identifying the starting position of the search; 0 if omitted.

Return Values

Type: Integer

A numeric value representing the position in the string where the specified pattern was found; otherwise nil if the pattern is not found; the first character of the string is position 0.

Examples

(vl-string-search "foo" "pfooyey on you")
1

(vl-string-search "who" "pfooyey on you")
nil

(vl-string-search "foo" "fooey-more-fooey" 1)
11