Reverse String

Description

This operation allows you to reverse the order of characters in a given string. This operation is handy for text manipulation, encoding challenges, and debugging scenarios where reversing the text is required.


Data types

These are the input/output expected data types for this operation:

Input data

- The strings of text that you want to reverse.

Output data

- Reversed strings.


Parameters

These are the parameters you need to configure to use this operation (mandatory parameters are marked with a *):

Reverse mode*

Choose the method you want to use to reverse your input strings. Choose one of the following options:

  • Character - Reverses the order of characters in the entire input.

For example, this string:

Hello World!

would be transformed like this:

!dlroW olleH

  • Line - Reverses the order of lines in the input.

For example, these strings:

Hello World!

This is an example

would be transformed like this:

This is an example

Hello World!

  • Bytes - Reverses the order of bytes in the entire input, assuming ASCII encoding where each character is one byte. This is useful when dealing with binary data, hexadecimal values, or encoded formats where the order of the bytes needs to be reversed for processing or analysis.

For example, this string:

48656c6c6f20576f726c64

would be transformed like this:

646c726f57206f6c6c6548

Example

Suppose you want to reverse a series of strings in your input data:

  1. In your Pipeline, open the required Action configuration and select the input Field.

  2. In the Operation field, choose Reverse string.

  3. Set Reverse mode to Character.

  4. Give your Output field a name and click Save.

With the parameters set above, the following text:

Hello World!   

will be transformed like this:

!dlroW olleH

You can try out operations with specific values using the Input field above the operation. You can enter the value in the example above and check the result in the Output field.

Last updated

Was this helpful?