GoFiler Legato Script Reference
Legato v 1.5d Application v 5.25a
|
Table of Contents | < < Previous | Next >> |
Chapter Five — General Functions (continued)
Overview
The ConvertAddNewlines function adds newline characters to a string by replacing ASCII carriage return and new line characters. The primary purpose of the function is to convert strings for use in various Windows controls and within files.
Syntax/Parameters
Syntax
string = ConvertAddNewlines ( string data );
Parameters
data
A string.
Return Value
Returns a string with newline characters or an empty string on failure. Use the GetLastError function to retrieve error information.
Remarks
The ConvertAddNewlines function searches the string for ASCII carriage return characters (‘\r’) and new line (‘\n’) characters and replaces them with “\r\n”, which is commonly used in Windows. This is particularly useful when formatting a string for use in Windows dialog boxes and controls, where reconciling different styles of denoting line endings is important. Note that the ConvertAddNewlines function has a processing limitation of 2MB at a time and is therefore not optimal for converting line endings within files or large chunks of text. Additionally, the ReadLine function returns a line of a file irrespective of its line ending.
If the 2MB buffer is exceeded, the GetLastError function will return ERROR_OVERFLOW.
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.