Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter FiveGeneral Functions (continued)

IsInString Function

Overview

The IsInString function will search a target string for a matching string or character.

Syntax/Parameters

Syntax

boolean = IsInString ( string source, mixed value, [boolean case] );

boolean = IsInString ( wstring source, mixed value, [boolean case] );

Parameters

source

A string or wstring to search.

value

A string or wstring, the type must match the source, or

a char, wchar, or int to search for in source.

case

A boolean flag indicating whether to perform the search in a case-sensitive manner. The default is a TRUE indicating a case-sensitive search.

Return Value

Returns TRUE if value is found within source or FALSE if it is not.

Remarks

When searching with a string, the source and value parameters must be the same variable type.

This function is the boolean equivalent of the InString function. Do not confuse the functions since using InString as a boolean will yield unpredictable results. For example:

if (InString("abc", "a")) {

    ...    

    }

will return the value 0 as an index, which will in turn be interpreted as FALSE.

This function performs case-sensitive searching; for looser matching, use the FindInString function. 

Case-insensitive matching is performed on a locale basis as set by Windows. For US, on ASCII matching is the only case matching performed.

If the value is a string and the string is empty, the result is always FALSE.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic