See them below:
Operator | Example | Action |
---|---|---|
concat | concat(constant(“cachorro”), constant(“quente”)) | The operator concatenates the strings it has as inputs. |
capitalize | capitalize(constant(“brasil”)) | The operator transforms the first string letter into upper case. |
uppercase | uppercase(constant(“brasil”)) | The operator transforms every letter of a string into upper case. |
lowercase | lowercase(constant((“BRASIL”)) | The operator transforms every letter of a string into lower case. |
substr | substr(constant(“brasil”), constant(3)) | The operator returns a substring of an 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’s threshold. |
The example shows a screen that has a text with a substring
operation.
It has the sentence
The parameters are:
See below:
fun screen() = Screen(
child = Container(
children = listOf(
Text(text = constant("The text bellow is a substring of `The book is on the table`.")),
Container(
children = listOf(
Text(substring(constant("The book is on the table"), constant(4), constant(11)))
)
).setStyle { backgroundColor = constant("#00FF00") }
)
)
)
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.