feanz
1/9/2015 - 4:01 PM

Remove character extensions (string Exntensions)

Remove character extensions (string Exntensions)

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);
}