CSharp examples for System:String Shorten
Delete Last Letter
using System.Text.RegularExpressions; using System.Text; using System.Security.Cryptography; using System.Collections; using System;/*ww w .ja va 2 s. co m*/ public class Main{ public static string DeleteLastLetter(this string str) { if (str.Length < 2) { return str; } return str.Substring(0, str.Length - 1); } }