To append comma in between Full string

my string like this: Amazon private ltd. – Amazon private, ltd.
ending string has “ltd” then append comma in front of “ltd”

try it as using the assign activity

endString = “,” + endString @brindhaS

@brindhaS
You can use the string function EndsWith to tell if a string ends with a certain string.
image

If it does then you can use Insert to place the comma.
image
image

If you want to match LTD. or ltd. or any combination of cases you can do myString.ToUpper.EndsWith("LTD.") as your If condition.

If you wish to accept “ltd” (without the period) then simply change the EndsWith value and change the index from 5 to 4 in the Insert function.

1 Like

thanks its working

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.