CSharp examples for System:String Start End
Start String
using System.Text; using System.Linq; using System;// ww w . j av a 2s . c o m public class Main{ public static string StartString(this string src, int numChars) { if (src == null) return null; if (src.Length >= numChars) return src.Substring(0, numChars); return src; } }