String - Removing extra spaces

I have a string variable as below
Location = " Bangalore "

I want remove spaces before and after. Could you please help me any one?
Location = “Bangalore”


Use Location.Trim

Thanks Lakshman !. Could you please provide me full syntax?
Because i am very new to UiPath.


Take Assign activity and then use below one
String resultString = variablestringname.Trim


Ok. Thank you so much Lakshman !. Got it :slight_smile:


Please mark it above one as solution and will be helpful to others.

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