DADiSP Worksheet Functions > Function Categories > String Manipulation > STRFIND

 

STRFIND

Purpose:

Returns the portion of a search string that contains a pattern string.

Syntax:

STRFIND("pattern", "srchstr", caseflag)

"pattern"

-

A string. The pattern string to search for.

"srchstr"

-

A string. The search string to search in.

caseflag

-

Optional. An integer, the case sensitivity flag.

 

 

0:

case not significant (default)

1:

case significant

Returns:

A string.

Example:

strfind("XINC", "YOR:12.3 XINC:1.0 YREF:120.0")

 

returns the string: XINC:1.0 YREF:120.0.

Example:

W1: RUN1.1.ANALOG1

 

s = strfind("an", getwformula(W1))

 

s == "ANALOG1".

Example:

W1: RUN1.1.ANALOG1

 

s = strfind("an", getwformula(W1), 1)

 

returns an empty string.

Returns:

If the search string does not contain the pattern, an empty string is returned.

See Also:

STRCAT

STRCMP

STREXTRACT

STRGET

STRMATCH

STRREPLACE

STRSORT

STRTRIM