Created
          January 9, 2015 16:01 
        
      - 
      
- 
        Save feanz/e6314454b264e364c0e3 to your computer and use it in GitHub Desktop. 
    Remove character extensions (string Exntensions)
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public static string RemoveLastCharacter(this string input) | |
| { | |
| return input.Substring(0, input.Length - 1); | |
| } | |
| public static string RemoveLast(this string instr, int number) | |
| { | |
| return input.Substring(0, input.Length - number); | |
| } | |
| public static string RemoveFirstCharacter(this string input) | |
| { | |
| return input.Substring(1); | |
| } | |
| public static string RemoveFirst(this string input, int number) | |
| { | |
| return input.Substring(number); | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment