Text (vuo.text)
Nodes for manipulating and getting information from text.
Almost all Vuo nodes use the UTF-8 encoding for the Unicode character set. This means that they can handle ASCII characters (such as the English/Latin alphabet) as well as others, such as accented characters, non-Latin alphabets, symbols, and emoji. Nodes with ASCII
in the title use just the ASCII character set (not full Unicode).
You can enter multiple lines of text into a text input editor by using Option-Return to insert line breaks.
Several nodes in this set — such as Cut Text, Insert Text, and Find Text — use an index number to represent a position in the text. Index 1 represents the first character.
Comparing text
Some nodes, such as Compare Texts and Find Subtrees with Content, provide multiple methods for comparing text:
- Comparison type
- Equals — The entire subject text must match the entire search text.
- Contains — The subject text must contain the search text.
- Begins with — The subject text must start with the search text.
- Ends with — The subject text must end with the search text.
- Matches wildcard — The entire subject text must match the wildcard text, which can use special symbols to define the matching criteria:
?
matches any single character
*
matches anything — no characters, or one or more characters
[xyz]
matches one of the characters between the brackets
- See glob(7) for more information.
- Matches regular expression — The subject text must match the regular expression, which can use special symbols to define the matching criteria:
.
matches any single character
.+
matches one or more characters
.*
matches anything — no characters, or one or more characters
[xyz]
matches one of the characters between the brackets
[xyz]+
matches one or more of characters between the brackets
- The regular expression does not need to match the entire subject text, though by using anchors (
^…$
) you can require that.
- See this introduction for more information. This comparison type uses POSIX Extended Regular Expressions.
- Case sensitivity — When enabled, the capitalization of the texts must match.
Example compositions:
Nodes:
- Append Texts (vuo.text.append): Appends the input texts together to create a composite text.
- Change Case (vuo.text.case): Changes the capitalization of a string.
- Compare Texts (vuo.text.compare): Compares two texts and outputs the result.
- Count Characters (vuo.text.countCharacters): Gives the number of characters in the text.
- Cut Text (vuo.text.cut): Outputs part of the input text.
- Find Text (vuo.text.find): Outputs a list containing the index of each occurrence of Text to Find in Text.
- Format Number (vuo.text.format.number): Formats a real number as text.
- Get ASCII Code (vuo.text.get.ascii): Outputs the ASCII decimal value for a single character of text.
- Insert Text (vuo.text.insert): Adds text into other text.
- Make Text from ASCII (vuo.text.make.ascii): Creates a new text value from an ASCII code.
- Make Text from Control Code (vuo.text.make.controlCode): Creates a new text value from a Control Code.
- Remove HTML (vuo.text.removeHtml): Converts HTML to plain text.
- Replace Text (vuo.text.replace): Outputs text in which each occurrence of Text to Find in Text has been replaced with Replacement.
- Split Text (vuo.text.split): Separates the text into parts.
- Split Text Stream (vuo.text.split.stream): Separates a stream of text into parts.