> For the complete documentation index, see [llms.txt](https://docs.tivity.one/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tivity.one/building-an-application/execution/scripting/functions/text.md).

# Text

## Concat

Takes a list of items as input and returns one concatenated String.

#### Syntax <a href="#pragma-line-5373" id="pragma-line-5373"></a>

```
Concat ( Values )
```

#### Parameters <a href="#pragma-line-5379" id="pragma-line-5379"></a>

***Values***\
&#x20;The list of items which will be concatenated.\
&#x20;Type: List\<Any>

#### Return Type <a href="#pragma-line-5386" id="pragma-line-5386"></a>

String

## Empty

Returns an empty String.

#### Syntax <a href="#pragma-line-5395" id="pragma-line-5395"></a>

```
Empty (  )
```

#### Parameters <a href="#pragma-line-5401" id="pragma-line-5401"></a>

No parameters

#### Return Type <a href="#pragma-line-5405" id="pragma-line-5405"></a>

String

## EndString

Takes the String ValueA as input and returns a String of the specified length starting from the end.

#### Syntax <a href="#pragma-line-5414" id="pragma-line-5414"></a>

```
EndString ( Value , Length )
```

#### Parameters <a href="#pragma-line-5420" id="pragma-line-5420"></a>

***Value***\
&#x20;String the operation is performed on.\
&#x20;Type: String

***Length***\
&#x20;Length of the substring.\
&#x20;Type: Int

#### Return Type <a href="#pragma-line-5431" id="pragma-line-5431"></a>

String

## Format

Represents the formatting of a template.

#### Syntax <a href="#pragma-line-5440" id="pragma-line-5440"></a>

```
Format ( Template [, Expressions] )
```

#### Parameters <a href="#pragma-line-5446" id="pragma-line-5446"></a>

***Template***\
&#x20;HTML formatted Template\
&#x20;Type: String

***Expressions*** (optional)\
&#x20;List of expressions which are used in the Template.\
&#x20;Type: Any

#### Return Type <a href="#pragma-line-5457" id="pragma-line-5457"></a>

String

## FormatExpression

Formats a Template by replacing placeholders with they given Values.

#### Syntax <a href="#pragma-line-5466" id="pragma-line-5466"></a>

```
FormatExpression ( Template , Values )
```

#### Parameters <a href="#pragma-line-5472" id="pragma-line-5472"></a>

***Template***\
&#x20;The Template to format.\
&#x20;Type: String

***Values***\
&#x20;The Values used to replace placeholders (e.g. ).\
&#x20;Type: Dictionary\<Any,Any>

#### Return Type <a href="#pragma-line-5483" id="pragma-line-5483"></a>

String

## GetResourceValue

Returns the value of a resource, locale, and key. Returns NULL if either the resource or key are not found in either the locale or default locale.

#### Syntax

```
GetResourceValue( String Resource, String [Locale], String Key )
```

#### Parameters

***Resource***\
The name of the resource.\
Type: String

***Locale*** (optional)\
The name of the locale. Uses the language of the current user by default.\
Type: String

***Key***\
The key of the value.\
Type: String

#### Return Type

String

## IndexOf

Gets the Index of a given Search in a String Value.

#### Syntax <a href="#pragma-line-5492" id="pragma-line-5492"></a>

```
IndexOf ( Value , Search [, StartIndex] [, Count] )
```

#### Parameters <a href="#pragma-line-5498" id="pragma-line-5498"></a>

***Value***\
&#x20;The String Value to search.\
&#x20;Type: String

***Search***\
&#x20;The String to Search for.\
&#x20;Type: String

***StartIndex*** (optional)\
&#x20;The Index to start the search from.\
&#x20;Type: Int

***Count*** (optional)\
&#x20;The Count of Chars to search after the start.\
&#x20;Type: Int

#### Return Type <a href="#pragma-line-5517" id="pragma-line-5517"></a>

Int

## Join

Takes a list of values as input, performs the toString method on each item and concatenates the given Values separated by the given Separator and returns the whole String.

#### Syntax <a href="#pragma-line-5526" id="pragma-line-5526"></a>

```
Join ( Separator , Values )
```

#### Parameters <a href="#pragma-line-5532" id="pragma-line-5532"></a>

***Separator***\
&#x20;String which is used to separate the elements.\
&#x20;Type: String

***Values***\
&#x20;List of elements which will be concatenated.\
&#x20;Type: List\<Any>

#### Return Type <a href="#pragma-line-5543" id="pragma-line-5543"></a>

String

## Length

Gets the Length of a given String Value.

#### Syntax <a href="#pragma-line-5552" id="pragma-line-5552"></a>

```
Length ( Value )
```

#### Parameters <a href="#pragma-line-5558" id="pragma-line-5558"></a>

***Value***\
&#x20;The String Value to get the Length of.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-5565" id="pragma-line-5565"></a>

Int

## Match

Search the Value for a RegEx-Pattern and returns first match and its groups.

#### Syntax <a href="#pragma-line-5574" id="pragma-line-5574"></a>

```
Match ( Value , Pattern )
```

#### Parameters <a href="#pragma-line-5580" id="pragma-line-5580"></a>

***Value***\
&#x20;The Value to search in.\
&#x20;Type: String

***Pattern***\
&#x20;The RegEx-Pattern to search for.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-5591" id="pragma-line-5591"></a>

List\<String>

## Matches

Search the Value for a RegEx-Pattern and returns all matches and its groups.

#### Syntax <a href="#pragma-line-5600" id="pragma-line-5600"></a>

```
Matches ( Value , Pattern )
```

#### Parameters <a href="#pragma-line-5606" id="pragma-line-5606"></a>

***Value***\
&#x20;The Value to search in.\
&#x20;Type: String

***Pattern***\
&#x20;The RegEx-Pattern to search for.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-5617" id="pragma-line-5617"></a>

List\<List\<String>>

## MatchesCapture

Searches an input string for all occurrences of a regular expression line for line.

#### Syntax <a href="#pragma-line-5626" id="pragma-line-5626"></a>

```
MatchesCapture ( Value , Pattern )
```

#### Parameters <a href="#pragma-line-5632" id="pragma-line-5632"></a>

***Value***\
&#x20;The string to search for a match.\
&#x20;Type: String

***Pattern***\
&#x20;RegEx-Pattern to match.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-5643" id="pragma-line-5643"></a>

List\<String>

## PadLeft

Pads the Value with the Padding character on the left side for a given Width.

#### Syntax <a href="#pragma-line-5652" id="pragma-line-5652"></a>

```
PadLeft ( Value , Width [, Padding] )
```

#### Parameters <a href="#pragma-line-5658" id="pragma-line-5658"></a>

***Value***\
&#x20;String which will be used as basis for the operation.\
&#x20;Type: String

***Width***\
&#x20;Length of the padding.\
&#x20;Type: Int

***Padding*** (optional)\
&#x20;Char used as padding.\
&#x20;Type: Char

#### Return Type <a href="#pragma-line-5673" id="pragma-line-5673"></a>

String

## PadRight

Pads the Value with the Padding character on the right side for a given Width.

#### Syntax <a href="#pragma-line-5682" id="pragma-line-5682"></a>

```
PadRight ( Value , Width [, Padding] )
```

#### Parameters <a href="#pragma-line-5688" id="pragma-line-5688"></a>

***Value***\
&#x20;String which will be used as basis for the operation.\
&#x20;Type: String

***Width***\
&#x20;Length of the padding.\
&#x20;Type: Int

***Padding*** (optional)\
&#x20;Char used as padding.\
&#x20;Type: Char

#### Return Type <a href="#pragma-line-5703" id="pragma-line-5703"></a>

String

## Replace

Replaces the Pattern Old with the Pattern New in the String Value.

#### Syntax <a href="#pragma-line-5712" id="pragma-line-5712"></a>

```
Replace ( Value , Old , New )
```

#### Parameters <a href="#pragma-line-5718" id="pragma-line-5718"></a>

***Value***\
&#x20;String which will be used as basis for the operation.\
&#x20;Type: String

***Old***\
&#x20;Pattern which is replaced.\
&#x20;Type: String

***New***\
&#x20;Value which is the replacement.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-5733" id="pragma-line-5733"></a>

String

## RestString

Retrieves a substring thats starts at a specified character position and continues to the end of the string. The index of the first character is 0.

#### Syntax <a href="#pragma-line-5742" id="pragma-line-5742"></a>

```
RestString ( Value , Index )
```

#### Parameters <a href="#pragma-line-5748" id="pragma-line-5748"></a>

***Value***\
&#x20;String which will be used as basis for the operation.\
&#x20;Type: String

***Index***\
&#x20;Index position from which the String is cut off.\
&#x20;Type: Int

#### Return Type <a href="#pragma-line-5759" id="pragma-line-5759"></a>

String

## Split

Returns a list of Strings by splitting the Value using a Separator.

#### Syntax <a href="#pragma-line-5768" id="pragma-line-5768"></a>

```
Split ( Value , Separator )
```

#### Parameters <a href="#pragma-line-5774" id="pragma-line-5774"></a>

***Value***\
&#x20;The Value to split.\
&#x20;Type: String

***Separator***\
&#x20;The Separator to split the Value.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-5785" id="pragma-line-5785"></a>

List\<String>

## StartString

Returns a copy of the original String ValueA with a specified length Length starting at the first character of the string.

#### Syntax <a href="#pragma-line-5794" id="pragma-line-5794"></a>

```
StartString ( Value , Length )
```

#### Parameters <a href="#pragma-line-5800" id="pragma-line-5800"></a>

***Value***\
&#x20;String the operation is performed on.\
&#x20;Type: String

***Length***\
&#x20;Length of the substring.\
&#x20;Type: Int

#### Return Type <a href="#pragma-line-5811" id="pragma-line-5811"></a>

String

## StripHtml

Strips HTML tags from the Value and returns the result.

#### Syntax <a href="#pragma-line-5820" id="pragma-line-5820"></a>

```
StripHtml ( Value )
```

#### Parameters <a href="#pragma-line-5826" id="pragma-line-5826"></a>

***Value***\
&#x20;The Value to strip the HTML from.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-5833" id="pragma-line-5833"></a>

String

## SubString

Returns a substring that starts at the character position Index and has a specified length Length. The index of the first character is 0.

#### Syntax <a href="#pragma-line-5842" id="pragma-line-5842"></a>

```
SubString ( Value , Index , Length )
```

#### Parameters <a href="#pragma-line-5848" id="pragma-line-5848"></a>

***Value***\
&#x20;String used as basis for the operation.\
&#x20;Type: String

***Index***\
&#x20;Position, which is used as a starting point for the Substring.\
&#x20;Type: Int

***Length***\
&#x20;Length of the substring.\
&#x20;Type: Int

#### Return Type <a href="#pragma-line-5863" id="pragma-line-5863"></a>

String

## ToLower

Takes a String as input and returns a copy of that String in lower case characters.

#### Syntax <a href="#pragma-line-5872" id="pragma-line-5872"></a>

```
ToLower ( Value )
```

#### Parameters <a href="#pragma-line-5878" id="pragma-line-5878"></a>

***Value***\
&#x20;String used as basis for the operation.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-5885" id="pragma-line-5885"></a>

String

## ToUpper

Takes a String as input and returns a copy of that String in upper case characters.

#### Syntax <a href="#pragma-line-5894" id="pragma-line-5894"></a>

```
ToUpper ( Value )
```

#### Parameters <a href="#pragma-line-5900" id="pragma-line-5900"></a>

***Value***\
&#x20;String used as basis for the operation.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-5907" id="pragma-line-5907"></a>

String

## Translate

Represents a translator for languages.

#### Syntax <a href="#pragma-line-5916" id="pragma-line-5916"></a>

```
Translate ( Language , Default , Translations )
```

#### Parameters <a href="#pragma-line-5922" id="pragma-line-5922"></a>

***Language***\
&#x20;The Language to translate to.\
&#x20;Type: Language

***Default***\
&#x20;The Default text if no translation for the Language is found.\
&#x20;Type: String

***Translations***\
&#x20;The Translations where to search for the correct Language.\
&#x20;Type: List\<Translation>

#### Return Type <a href="#pragma-line-5937" id="pragma-line-5937"></a>

String

## Translation

Represents a Translation for a Language.

#### Syntax <a href="#pragma-line-5946" id="pragma-line-5946"></a>

```
Translation ( Language , Text )
```

#### Parameters <a href="#pragma-line-5952" id="pragma-line-5952"></a>

***Language***\
&#x20;The Language of the Translation.\
&#x20;Type: Language

***Text***\
&#x20;The Translation text.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-5963" id="pragma-line-5963"></a>

Translation

## Trim

Removes space characters on both sides of the String.

#### Syntax <a href="#pragma-line-5972" id="pragma-line-5972"></a>

```
Trim ( Value )
```

#### Parameters <a href="#pragma-line-5978" id="pragma-line-5978"></a>

***Value***\
&#x20;String which is the basis of the operation.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-5985" id="pragma-line-5985"></a>

String

## TrimLeft

Removes space characters on the left side of the String.

#### Syntax <a href="#pragma-line-5994" id="pragma-line-5994"></a>

```
TrimLeft ( Value )
```

#### Parameters <a href="#pragma-line-6000" id="pragma-line-6000"></a>

***Value***\
&#x20;String which is the basis of the operation.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-6007" id="pragma-line-6007"></a>

String

## TrimRight

Removes space characters on the right side of the String.

#### Syntax <a href="#pragma-line-6016" id="pragma-line-6016"></a>

```
TrimRight ( Value )
```

#### Parameters <a href="#pragma-line-6022" id="pragma-line-6022"></a>

***Value***\
&#x20;String which is the basis of the operation.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-6029" id="pragma-line-6029"></a>

String
