GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Five — General Functions (continued)
Overview
The CompareStrings function compares the value of the characters between two strings and returns a result as less than, equal to, or greater than.
Syntax/Parameters
Syntax
int = CompareStrings ( string a, string b );
Parameters
a
A string to compare.
b
A string to compare.
Return Value
Returns an int value as:
-1 | if a < b |
0 | if a == b |
1 | if a > b |
Remarks
The CompareStrings function combines the basic comparison operators (==, <, and >) to allow string comparison in a single operation. The function compares a and b on a character by character basis. If all characters matchup between the strings up to the matching terminating /0 character, the return result is 0. If any character mismatches, the comparison is stopped and -1 or 1 is returned depending on whether the character in a is less than the character at the same position in b.
Except for the terminating zero (as is the case with string types), the CompareString function essentially performs a binary, character-for-character comparison.
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.