For suppose, I have a string str=“Hello, DisplayName=“Break”” and I want to concatenate another string, say appendstr="Private: " at some specific index in str. How can I do it?
Any suggestion is appreciated. Thanks in advance!!
For suppose, I have a string str=“Hello, DisplayName=“Break”” and I want to concatenate another string, say appendstr="Private: " at some specific index in str. How can I do it?
Any suggestion is appreciated. Thanks in advance!!
Hi
Welcome to uipath community
Yah we can do like this
stringvariable.ToString.Insert(your index position, “your new string”)
Where index usually starts from 0 for the first character in the string
Cheers @vamsikrish28
There is no function such as Index in uipath.
Aaha that was a typo mistake
It’s Insert
stringvariable.ToString.Insert(your index position, “your new string”)
Please note that string is an atomic data type so you cannot manipulate them internally. You need to reassign your variable with the new value using relevant activities like Assign or Invoke Code. In your case it would be stringVariable = stringVariable.Insert(index, textToBeInserted)
.
Thank you very much!! It helped me a lot.
Cheers @vamsikrish28
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.