PalacePal/Pal.Client/Extensions/GuidExtensions.cs

14 lines
353 B
C#
Raw Normal View History

2023-02-11 20:10:45 +00:00
using System;
namespace Pal.Client.Extensions
{
public static class GuidExtensions
{
public static string ToPartialId(this Guid g, int length = 13)
=> g.ToString().ToPartialId();
public static string ToPartialId(this string s, int length = 13)
=> s.PadRight(length + 1).Substring(0, length);
}
}