How to remove white spaces from starting of a string in C#

1 Answer

0 votes
using System;

class Program
{
    static void Main() {
        string s = "    c# programming";

        s = s.TrimStart();
        
        Console.Write(s);
    }
}




/*
run:
 
c# programming
 
*/

 



answered Nov 14, 2021 by avibootz

Related questions

1 answer 155 views
2 answers 101 views
1 answer 240 views
1 answer 181 views
2 answers 226 views
1 answer 176 views
...