Text change case
Block is used to adjust case of the letters in a string. Source string is connected to the right side of block.
Available block options:
- UPPER CASE: changes all letters in string to uppercase.
- lower case: changes all letters in string to lowercase.
- Title Case: change every first character of all words to capital letter. Other characters are changed to lowercase.
Block accepts string or variable as an input and this input is required.
Output of the block is amended string according to the selected function.
In case provided input is not string block returns None.
XML representation of text_change_case block:
<xml xmlns="http://www.w3.org/1999/xhtml">
<block type="text_change_case">
<field name="CASE">UPPERCASE</field>
<value name="TEXT">
<block type="text">
<field name="TEXT">Input value</field>
</block>
</value>
</block>
<block type="text_change_case">
<field name="CASE">LOWERCASE</field>
<value name="TEXT">
<block type="text">
<field name="TEXT">Input value</field>
</block>
</value>
</block>
<block type="text_change_case">
<field name="CASE">TITLECASE</field>
<value name="TEXT">
<block type="text">
<field name="TEXT">Input value</field>
</block>
</value>
</block>
</xml>
Block is used twice in the example:
“Set user to lower case”: changes string “ADMINISTRATOR” to string “administrator” and saves it into the “user” variable.
“Set user to Title Case”: changes string “ADMINISTRATOR” to string “Administrator” and saves it into the “user” variable.