When i read csv file from hard it has some undesired space front of it

hi
i use a captcha service to solve captcha and it returns the result as string in csv file
so i set kantu to read first line by ${!COL1} but when i use type command to type it in text field it has a space to right side that cause failed for submitting form
what can i do for solving this problem

Use the function “executeScript_Sandbox”:

Run this javascript:

return ${!COL1}.trim()

to trim the excess space.