Remove spaces infront while populating data from datasheet

Please help me here.

  1. I am extracting data from data table
  2. populating those data in web application in one text field.

Good thing is - I can able to populate the same data
Bad thing is - It is writing the text with space at the beginning of the word.

Please help me how to remove that space in front of the word.
Responses are much appreciated.

use your variblename.Tostring.trim()

else use assign newvariable= variable.tostring.replace(" “,”");

If you want to remove the space only at the beginning of the data, then use YourData.trimstart()
But if the requirement is to eliminate space both at the beginning and end, use YourData.trim()

I tried all the ways you suggested. But still doesn’t work .
Please help me

Please try what @Madhavi suggested

I used trim and trim start …Its not working.

But its working for replace function newvariable= variable.tostring.replace(" “,”");

The issues I am facing now is : Replace function is able to perform out to remove spaces in one run but may not be able to do in all run

Why so ?

If it runs for one run it should work for all runs, have you checked is there a single space or multiple space in your input string? If it is multiple string replace method will replace only single space, and other spaces remains in your input

There are no spaces at all in my input string .

Thanks guys for you replies… it got fixed after I checked click before typing and empty field on the properties menu