String Operations

This function block allows users to perform various operations on strings. Users can select the desired string operation from a dropdown menu, providing a simple interface for manipulating text.

πŸ“₯ Inputs

String A single string that serves as the main input for the selected operation. The number of input sockets may vary depending on the chosen operation.

πŸ“€ Outputs

String This output provides the result of the string operation applied to the input string(s).

πŸ•ΉοΈ Controls

Method Selection A dropdown menu that allows users to select which string operation they want to perform. The available operations include:

  • Upper: Converts all characters to uppercase.

  • Lower: Converts all characters to lowercase.

  • IsLower: Checks if all characters are lowercase.

  • IsUpper: Checks if all characters are uppercase.

  • Count: Counts how many times a specific character appears in the input string.

  • Merge: Combines two strings.

  • In: Checks if a substring exists within the main string and provides the index of its first occurrence.

  • Join: Joins a list of strings with a specified substring.

  • Split: Splits a string into a list based on a specified substring.

  • Replace: Replaces specified characters in a string with others.

🎨 Features

Dynamic Input/Output The number of input and output sockets dynamically changes based on the selected string operation, making the block versatile.

User-Friendly Interface The dropdown for selecting string operations makes it easy for users to navigate and choose their desired operation.

πŸ“ Usage Instructions

  1. Connect Input: Link a string source to the input socket.

  2. Select Operation: Choose the desired string operation from the Method Selection dropdown.

  3. Provide Additional Inputs: Depending on the selected operation, you may need to provide additional input(s).

  4. Evaluate: Run the block to perform the string operation. The result will be available at the output socket.

πŸ“Š Evaluation

When executed, this function block applies the selected operation to the input string(s) and provides the result as an output.

πŸ’‘ Tips and Tricks

Combining Operations

You can chain multiple String Operation blocks together to create more complex string manipulations. For instance, transform a string to uppercase before checking if it contains a specific substring.

Using Join and Split Together

You can join a list of strings with a separator and then use the Split operation to break the joined string back into a list based on the separator.

Counting Characters

Use the Count operation to see how many times a specific character appears in a string, which can help in text analysis tasks.

πŸ› οΈ Troubleshooting

Invalid Input for Operations

Make sure that the inputs you provide match the expected types for the selected operation. For example, the Count operation requires both a main string and a substring.

Operation Not Working

If the selected operation is not functioning as expected, check to ensure that the inputs are connected correctly and the operation requires the right number and type of inputs.

Last updated