mirror of
https://github.com/hargata/lubelog.git
synced 2025-12-11 04:37:03 -06:00
28 lines
803 B
C#
28 lines
803 B
C#
namespace CarCareTracker.Helper
|
|
{
|
|
/// <summary>
|
|
/// helper method for static vars
|
|
/// </summary>
|
|
public static class StaticHelper
|
|
{
|
|
public static string DbName = "data/cartracker.db";
|
|
public static string UserConfigPath = "config/userConfig.json";
|
|
public static string GenericErrorMessage = "An error occurred, please try again later";
|
|
|
|
public static string TruncateStrings(string input, int maxLength = 25)
|
|
{
|
|
if (string.IsNullOrWhiteSpace(input))
|
|
{
|
|
return string.Empty;
|
|
}
|
|
if (input.Length > maxLength)
|
|
{
|
|
return (input.Substring(0, maxLength) + "...");
|
|
} else
|
|
{
|
|
return input;
|
|
}
|
|
}
|
|
}
|
|
}
|