mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Truncate member profile in long system list
This commit is contained in:
parent
a201ad644e
commit
fe22ba4f32
2 changed files with 3 additions and 7 deletions
|
|
@ -41,11 +41,6 @@ namespace PluralKit
|
|||
return Convert.ToBase64String(buf);
|
||||
}
|
||||
|
||||
public static string Truncate(this string str, int maxLength, string ellipsis = "...") {
|
||||
if (str.Length < maxLength) return str;
|
||||
return str.Substring(0, maxLength - ellipsis.Length) + ellipsis;
|
||||
}
|
||||
|
||||
public static bool IsLongerThan(this string str, int length)
|
||||
{
|
||||
if (str != null) return str.Length > length;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue