How to remove only leading space from string?

 Posted by vishalneeraj-24503 on 12/12/2013 | Category: C# Interview questions | Views: 1012 | Points: 40
Answer:

We can use TrimStart() Dot Net method to remove leading space from string.

For Example:-

string str = " Vishal ";
str = str.TrimStart();
MessageBox.show(str);

Output will be:-

"Vishal "


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response