Reverse String

Hi, I’m trying to reverse a string but with no success.
I’ve tried using ToCharArray, and then using the Array.Reverse but I must be doing something wrong with variable classification.
Can someone help me with a xaml example?

Hi @CSilva,

Here it is! Hugs from Brazil :brazil:

Main.xaml (5.9 KB)

:rofl:

1 Like

Muito obrigado @acaciomelo

Cumprimentos,
CSilva

1 Like

Any idea on the fact why Invoke Method is not working…
image

1 Like

Hi @Soumyodip_s,
Without Invoke method you can able to do it by Linq. Below I have attached the sample.

file :Reverse.zip (1.9 KB)

Regards
Balamurugan

7 Likes

Here is a detailed article on that :slight_smile:
# How To Reverse A String In UiPath

Regards,

Hello @CSilva

I’ve wrote a custom activity for this and several other operations on string. Maybe you can check it out.

Thank you!! Simple way to do it!

You can use StrReverse(stringToBeReversed) function to reverse the string.

5 Likes

Hi, here’s, the Result for Reverse String

If you look at the output panel you can see Reverse String output.