using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Villain.Data.Types
{
	public static class StringEx
	{
		public static string Truncate(this string value, int maxLength)
		{
			if (string.IsNullOrEmpty(value))
			{
				return value;
			}

			return value.Substring(0, Math.Min(value.Length, maxLength));
		}
	}
}