0

I want to replace all spaces in a line before a text comes, for example I have the following text:

@"  Hello\n   world"

and i want it to look like this:

@"Hello\nworld"

How can you do this for every line?

wintersan
  • 279
  • 1
  • 4
  • 10

1 Answers1

0

You need to trim white spaces from string. Check this thread. There is a solution.

Community
  • 1
  • 1
mert
  • 1,942
  • 2
  • 23
  • 43