Update 20241106

This commit is contained in:
Stefan Hutter
2024-11-06 16:12:09 +01:00
parent 0ddc71c2b3
commit 86be28ec33
89 changed files with 1029 additions and 107 deletions

29
Client/Helper/Strings.cs Normal file
View File

@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OnDoc.Helper
{
public static class Strings
{
public static string Right(this string value, int length)
{
if (String.IsNullOrEmpty(value)) return string.Empty;
return value.Length <= length ? value : value.Substring(value.Length - length);
}
public static string Left(this string value, int maxLength)
{
if (string.IsNullOrEmpty(value)) return value;
maxLength = Math.Abs(maxLength);
return (value.Length <= maxLength
? value
: value.Substring(0, maxLength)
);
}
}
}