GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Six — File Functions (continued)
Overview
The PathLevelUp function trims a branch of the path of a string.
Syntax/Parameters
Syntax
string = PathLevelUp ( string path );
Parameters
path
A string containing a path.
Return Value
Returns a string containing the adjusted path or an empty string is returned if path does not contain path delimiters.
Remarks
The PathLevelUp function merely looks back from the end of a string until a slash or backslash is located and trims off the string back to that point. If a filename is attached to the path, it will be clipped and the path will remain. If the path string contains a trailing slash, it is removed and then the scan for the next slash starts. If there are no remaining slashes, an empty string is returned.
For example:
Before | After | |
R:\Path1\Path2\ | R:\Path1\ | |
R:\Path1\Path2 | R:\Path1\ | |
R:\Path1\cat.htm | R:\Path1\ | |
R:\ | (empty) |
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.