Skip to main content

Reverse

Reverses the characters in a string, returning the string backwards.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs

  • String - The string to reverse.

Options

This node does not have configurable options.

Output

  • Result - The reversed string.

How It Works

The Reverse node reverses the order of characters in a string:

  • First character becomes last
  • Last character becomes first
  • Handles Unicode characters correctly
  • Empty string returns empty string

Usage Examples

Example 1: Simple Reverse

  • String: "Hello"
  • Result: "olleH"

Example 2: Palindrome Check

  • String: "racecar"
  • Result: "racecar" (same forwards and backwards)

Example 3: Reverse Sentence

  • String: "Hello World"
  • Result: "dlroW olleH"

Example 4: Reverse Numbers

  • String: "12345"
  • Result: "54321"

Example 5: Unicode Characters

  • String: "Hello 世界"
  • Result: "界世 olleH"

Tips

  • Useful for palindrome validation
  • Can be used in obfuscation techniques (not security)
  • Works correctly with Unicode characters
  • Combine with Compare to check if string is a palindrome
  • Not commonly used in business automation, more for text manipulation
  • Reversing twice returns the original string

Common Errors and Solutions

Error: Expected word-by-word reversal instead of character-by-character

  • Cause: Reverse operates on characters, not words
  • Solution: Use Split → Reverse array → Join for word-level reversal

Error: Unicode characters not handled properly

  • Cause: Using wrong string reversal method
  • Solution: This node handles Unicode correctly using rune-based reversal

Practical RPA Examples

Example: Palindrome Checker

Step 1: Store original string
Step 2: Reverse string
Step 3: Compare original with reversed
Result: If equal, it's a palindrome

String: "racecar"
Reversed: "racecar"
Compare: Equal → palindrome

Example: Simple Obfuscation

String: "secret"
Reversed: "terces"
Use: Basic text obfuscation (NOT cryptographically secure)

Example: Pattern Detection

String: "ABC123"
Reversed: "321CBA"
Use: Detect if string has specific pattern

Example: Reverse for Display

String: "12345"
Reversed: "54321"
Use: Display numbers in reverse order

Palindrome Validation Pattern

Check if a string reads the same forwards and backwards:

Step 1: Lowercase input → "Racecar" → "racecar"
Step 2: Remove spaces → "race car" → "racecar"
Step 3: Reverse → "racecar"
Step 4: Compare with original
Result: If equal, it's a palindrome

Word-Level Reversal

To reverse word order (not character order):

String: "Hello World Test"

Step 1: Split by " " → ["Hello", "World", "Test"]
Step 2: Reverse array → ["Test", "World", "Hello"]
Step 3: Join with " " → "Test World Hello"

Note: This requires array manipulation, not just the Reverse string node.

Double Reverse

Reversing twice returns original:

String: "Hello"
Reverse 1: "olleH"
Reverse 2: "Hello" (original)

Use Cases

Validation

  • Check for palindromes
  • Verify data integrity (reverse should produce expected result)

Text Processing

  • Create reversed text for display
  • Generate mirrored content

Algorithm Implementation

  • Part of string manipulation algorithms
  • Pattern matching

Notes

  • This node is not for encryption or security purposes
  • Reversing is a one-way operation that's easily reversed
  • Handles Unicode properly (multi-byte characters)
  • Empty string returns empty string
  • Single character returns the same character
  • Compare - Compare original and reversed for palindrome check
  • Lowercase - Normalize before palindrome check
  • Trim - Clean before reversing
  • Split - For word-level reversal
  • Join - Combine with split for word reversal