Houdini 21.0 Nodes APEX nodes

string::SubString

Extracts a substring from a string.

On this page
Since 21.0

Returns the substring of a string between the start and end character indices. The start and end integers are treated as modulo the length of the string, so values greater than the length of the string wrap around to the beginning of the string, and negative values wrap around to the end of the string. After wrapping, if the position of the start of the substring is further than the end of the substring, an empty string is returned.

Tip

A start or end value of -n indexes the nth last character of the string.

Inputs

string: String

Input string from which the substring is extracted.

start: Int

Index of the first character of the substring within string. This is treated as modulo the length of the string.

end: Int

Index of the last character of the substring within string. This is treated as modulo the length of the string.

Outputs

substring: String

The substring extracted from the input string.

See also

APEX nodes