ListFormat

Method

Sets a format for the List() function

Product: 

Class: 

Warning

uCalc API Preview Release Notice:The uCalc engine has successfully transitioned to modern cross-platform environments.The next phase envolves some structural changes, performance optimizations, and API refinements.The API is subject to breaking changes prior to the stable release. Please evaluate the preview version thoroughly before production use.

Syntax

ListFormat(string, string, string, string, string, string, string)

Parameters

Separator
string
Separator
Prefix
string
(Default = "")
Prefix
Postfix
string
(Default = "")
Postfix
UserFunc
string
(Default = "")
UserFunc
Element
string
(Default = "x")
Element
Index
string
(Default = "Index")
Index
Count
string
(Default = "Count")
Count

Return

String

Remarks

This sets a format that determines how the value of Str() is returned. Separator will be inserted between each match; Prefix will be added before the string; Postfix is appended at the end of the string. UserFunc determines how each match is displayed. Element is the name of the variable to use in the function (x by default). Index is the name of the current match (Index by default). Count is the number of matches (Count by default).

For instance: Given this list of matches: "a", "b", "c", "d" ListOfChars().ListFormat(", ", "{", "}", "$' of :'").Str() would return: {1 of 4:a, 2 of 4:b, 3 of 4:c, 4 of 4:d}

Examples

This page last modified on: 

8/28/2026