String manipulation operator

You will find here the description of string manipulation operator

What are they?

OperatorsExampleAction
concat“@{concat(“cachorro”, “quente”)}”Operator that concatenates the strings that are as input.
capitalize“@{capitalize(brasil)}”Operator that changes the first string letter into a capital letter.
uppercase“@{uppercase(brasil)}”Operator that changes all letter of a string into uppercases.
lowercase“@{lowercase(BRASIL)}”Operator that changes all letters of a string into lowercases.
substr“@{substr(brasil, 3)}”Operator that returns a substring of a input string. This operation may have 2 or 3 inputs, where the first parameter is the string and the second and third ones are the string limit.

Example

This example, a screen has a text with the substring operation, which the sentence is ‘The book is on the table’ and the parameters is 4,11 determine the threshold of this substring, which it will turn the following string ‘book is on':

fun screen() = Screen(child = 
    Container(
        children = listOf(
            Text(text = "The text bellow is a substring of `The book is on the table`."),
            Text(
                expressionOf("@{substr('The book is on the table', 4, 11)}")
            ).setStyle{ backgroundColor = "#00FF00" }
        )
    )
)