GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Five — General Functions (continued)
Overview
The Tabify function scans a string, locates groups of spaces that can be replaced with tab characters (0x09).
Syntax/Parameters
Syntax
string = Tabify ( string data, [int size], [int position], [dword mode] );
Parameters
data
A source string containing the data to expand. The source cannot exceed 1,048,575 characters in size.
size
An optional int specifying the size of the tab stops. The value must be from 2 to 64. The default value is 8. If the value is not in range, 8 is assumed.
position
An optional int specifying the zero-based position to stop. When specified as not zero, this is the position where the processing will stop. If the value exceeds the size of the string, it is ignored.
mode
An optional dword specifying mode flags. The default is 0x00000000 or no flags. The only option is TABIFY_PROTECT_LITERALS which causes any area specified within single or double quotes to be excluded from processing.
Return Value
Returns a string with the adjusted data and tabs removed or an empty string on failure. Use the GetLastError function to retrieve error information.
Remarks
Tabify begins by expanding any existing tabs into a uniform string and then walks backwards replacing tabs and spaces with uniform tabs at the interval size. Since the string is expanded prior to replacing spaces with tabs, the resulting string cannot exceed the maximum buffer size of 1,048,575. If it does, the GetLastError function will return ERROR_OVERFLOW.
The processing replaces 2 or more spaces with tabs at each interval position as specified by the size parameter. Depending on the application, it may be desirable to not processes string literal values inside of quotes. To direct the process to exclude such areas, use the TABIFY_PROTECT_LITERALS option in the mode parameter.
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.