0 votes
1 view
in RPA by (12.8k points)

I am trying to reverse the string For Example string s= "Hello Robot Process Automation" will be changed to String s="Automation Process Robot Hello" in automation anywhere.

I tried below steps:-

  1. Reverse the sentence(it reverses the words and alphabets in words as well). 2. Split the sentence and put into list variable
  2. used a loop and in the same loop, I reversed again the alphabets so now the sentence will be like "Automation" "Process" "Robot" "Hello" into one list 4 I am not getting next step after this(joining of these words).

Please help.

1 Answer

0 votes
by (29.8k points)
edited by

Hi, you can follow the steps mentioned below to reverse a string in automation anywhere

  • Create a variable for storing the reversed string called vReversedString
  • Reverse the given string i.e from above string the output should be noitamotuA ssecorP toboR olleH
  • Split the reversed string by space deliminator and store in my-list-variable
  • Loop through my-list-variable
  • Reverse each element through the loop, store it to system variable clipboard or create a new variable to hold each element.
  • Concatenate and store to vReversedString = $vReversedString$ $clipboard$
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...