using Dalamud.Utility; namespace CustomizePlus.Core.Extensions { internal static class StringExtensions { /// /// Incognify string. Usually used for logging character names and stuff. Does nothing in debug build. /// public static string Incognify(this string str) { if (str.IsNullOrWhitespace()) return str; #if !INCOGNIFY_STRINGS return str; #endif if (str.Contains(" ")) { var split = str.Split(' '); if (split.Length > 2) return $"{str[..5]}..."; return $"{split[0][0]}.{split[1][0]}"; } return $"{str[..5]}..."; } } }