public static string Mask(this string str, int numExposed, char maskChar = '*', MaskTypeEnum type = MaskTypeEnum.All) { var maskedString = str; if (str.IsLengthAtLeast(numExposed)) { var builder = new StringBuilder(str.Length); int index = maskedString.Length - numExposed; if (type == MaskTypeEnum.AlphaNumericOnly) { CreateAlphaNumMask(builder, str, maskChar, index); } else { builder.Append(maskChar, index); } builder.Append(str.Substring(index)); maskedString = builder.ToString(); } return(maskedString); }
protected virtual void Reset() { maskType = MaskTypeEnum.Exclusive; mask = LayerMask.GetMask("Ignore Raycast"); }
protected override void OnEnable() { base.OnEnable(); maskType = MaskTypeEnum.Exclusive; mask = LayerMask.GetMask("Ignore Raycast"); }