Houdini 21.0 Nodes APEX nodes

string::ForceValidName

Ensures the string contains only valid characters.

On this page
Since 21.0

Checks the input string and, if necessary, converts it to a string that contains only valid alphanumeric and underscore characters in accordance with the conventions of common programming languages like C++ and Python. For example, an input string of foo<int> is converted to string foo_int_.

Inputs

input: String

The string to check.

safechars: String

The additional characters allowed in the string.

Outputs

result: String

The resulting string after enforcing the valid characters.

See also

APEX nodes