mirror of
https://github.com/hargata/lubelog.git
synced 2025-12-10 18:36:38 -06:00
27 lines
707 B
C#
27 lines
707 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 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;
|
|
}
|
|
}
|
|
}
|
|
}
|