GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Five — General Functions (continued)
Overview
The InString function will search a target string for a matching string or character and return its position. This function allows searching for a specific character.
Syntax/Parameters
Syntax
int = InString ( string source, mixed value, [boolean case] );
int = InString ( wstring source, mixed value, [boolean case] );
Parameters
source
A string in which to search for target.
value
A target string; or,
a target char. The character can be any type that will resolve to an integer.
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 an int containing the zero-based starting position within source where target was found (case-sensitive) or -1 on failure. Use the GetLastError function to retrieve error information.
Remarks
The InString function provides a method of determining the starting position of a character or string segment within a source string. For a looser matching method, use the FindInString function, but note that the FindInString function does not permit searching for a specific character. This makes the InString function a better choice for searching for a delimiter or a specific item within a string. A boolean version of this function is available as the IsInString function.
If value is not found within source, the GetLastError function will return -1.
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 -1.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.