String : String Pad Trim : String C# Examples


C# Examples » String » String Pad Trim »

 

String









    
using  System;    
    
class  MainClass  {    
    public  static  void  Main()  {    
        string  str  =  "          test        ";  
  
        Console.WriteLine("Original  string:"  +  str+"<");  
          
        //  Trim  spaces.  
        str  =  str.Trim();  
        Console.WriteLine("|"  +  str  +  "|");  
  
    }  
}
    
   
  
   



Output

Original string:     test    


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo String
» String Pad Trim