GoFiler Legato Script Reference
Legato v 1.5d Application v 5.25a
|
Table of Contents | < < Previous | Next >> |
Chapter Five — General Functions (continued)
Overview
The GetStringSegment function returns a segment of a string as defined by a starting position and an optional size.
Syntax/Parameters
Syntax
string = GetStringSegment ( string source, int position, [int size] );
wstring = GetStringSegment ( wstring source, int position, [int size] );
Parameters
source
A string or a wstring from which to get a string segment. The source data type directs the result data type.
position
An int position, counting from zero, at which the string segment begins.
size
An int containing optional number of characters to return. If omitted, the remainder of the source string is returned.
Return Value
Returns a string or a wstring containing the segment of source from position or an empty string on failure. Use the GetLastError function to retrieve error information.
Remarks
If position was beyond the end of the source string or position is in range but when added to the requested size it exceeds the length of the source string, the GetLastError function will return ERROR_RANGE.
The returned string is not trimmed for spaces and is returned verbatim. Tabs are counted as single characters. Use the tab expansion and compression functions (the ExpandTabs and CollapseTabs functions) to deal with realized tab positions.
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.