truncate text
Published: 30. January 2012 | Updated: 30. January 2012License: Microsoft Public License (MS-PL)
Categories: Framework » Strings
Tags: Basics C# Text
public static string Truncate(string value, int length) { return value.Length <= length ? value : value.Substring(0, length); }
| Send us feedback about this snippet » |





