uCalc API Version: 2.1.3-preview.2 Released: 6/17/2026

Warning

uCalc API Preview Release Notice:The documentation describes the intended behavior of the API. The current preview build contains incomplete features, unoptimized performance, and is subject to breaking changes.

ListFormat

Method

Product: 

String Library

Class: 

String

Sets a format for the List() function

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 = "")
Element
Index
string
(Default = "")
Index
Count
string
(Default = "")
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