18 lines
448 B
C#
18 lines
448 B
C#
namespace ReserveManagementSystemLib.Helpers
|
|
{
|
|
public static class StringExtensions
|
|
{
|
|
public static string Truncate(this string inputString, int numberOfCharacters)
|
|
{
|
|
if (inputString.Length <= numberOfCharacters)
|
|
{
|
|
return inputString;
|
|
}
|
|
else
|
|
{
|
|
return inputString.Substring(0, numberOfCharacters);
|
|
}
|
|
}
|
|
}
|
|
}
|