Code style fix
This commit is contained in:
@@ -1,32 +1,31 @@
|
|||||||
using Dalamud.Utility;
|
using Dalamud.Utility;
|
||||||
|
|
||||||
namespace CustomizePlus.Core.Extensions
|
namespace CustomizePlus.Core.Extensions;
|
||||||
|
|
||||||
|
internal static class StringExtensions
|
||||||
{
|
{
|
||||||
internal static class StringExtensions
|
/// <summary>
|
||||||
|
/// Incognify string. Usually used for logging character names and stuff. Does nothing in debug build.
|
||||||
|
/// </summary>
|
||||||
|
public static string Incognify(this string str)
|
||||||
{
|
{
|
||||||
/// <summary>
|
if (str.IsNullOrWhitespace())
|
||||||
/// Incognify string. Usually used for logging character names and stuff. Does nothing in debug build.
|
return str;
|
||||||
/// </summary>
|
|
||||||
public static string Incognify(this string str)
|
|
||||||
{
|
|
||||||
if (str.IsNullOrWhitespace())
|
|
||||||
return str;
|
|
||||||
|
|
||||||
#if !INCOGNIFY_STRINGS
|
#if !INCOGNIFY_STRINGS
|
||||||
return str;
|
return str;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (str.Contains(" "))
|
if (str.Contains(" "))
|
||||||
{
|
{
|
||||||
var split = str.Split(' ');
|
var split = str.Split(' ');
|
||||||
|
|
||||||
if (split.Length > 2)
|
if (split.Length > 2)
|
||||||
return $"{str[..5]}...";
|
return $"{str[..5]}...";
|
||||||
|
|
||||||
return $"{split[0][0]}.{split[1][0]}";
|
return $"{split[0][0]}.{split[1][0]}";
|
||||||
}
|
|
||||||
|
|
||||||
return $"{str[..5]}...";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $"{str[..5]}...";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user