How to remove blank spaces from string?

Hi team
I am getting text from OpenAi
I want to remove the Above and bellow blank space from the string

I have tried replace(ch160) as well as replace " ", “”

but not work
refer pic

image

Hi @Sanket_Shinde1

Try this:

Input = "  



Let's celebrate and cherish the beauty of nature today and every day. Happy Environment Day!"

Output = Input.Trim()

1 Like

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