Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

StringInString()

  • Last UpdatedJul 13, 2023
  • 1 minute read

Returns the position in a string of text where a specified string first occurs.

Category

String

Syntax

IntegerResult = StringInString( Text, SearchFor, StartPos, CaseSens );

Parameters

Text

The string that is searched. Actual string or a string equipment.item.

SearchFor

The string to be searched for. Actual string or a string equipment.item.

StartPos

Determines the position in the text where the search begins. Any number or an integer equipment.item.

CaseSens

Determines whether the search is case-sensitive.

0 = Not case-sensitive

1 = Case-sensitive

Any number or an integer equipment.item.

Remarks

If multiple occurrences of SearchFor are found, the location of the first is returned.

Examples

StringInString("The mixer is running", "mix", 1, 0) ' returns 5;

StringInString("Today is Thursday", "day", 1, 0) ' returns 3;

StringInString("Today is Thursday", "day", 10, 0) ' returns 15;

StringInString("Today is Veteran's Day", "Day", 1, 1) ' returns 20;

StringInString("Today is Veteran's Day", "Night", 1, 1) ' returns 0;

See Also

StringASCII(), StringChar(), StringFromIntg(), StringFromReal(), StringFromTime(), StringLeft(), StringLen(), StringLower(), StringMid(), StringReplace(), StringRight(), StringSpace(), StringTest(), StringToIntg(), StringToReal(), StringTrim(), StringUpper(), Text()

String Functions

In This Topic
Related Links