public static string ToZalgo(this string text, ZalgoSize size = ZalgoSize.Normal) { var newtxt = ""; for (var i = 0; i < text.Length; i++) { if (IsZalgoChar(text.ToCharArray()[i])) { continue; } newtxt += text.ToCharArray()[i]; newtxt += GetZalgo(); } return(newtxt); }
public static string GetZalgo(ZalgoSize size = ZalgoSize.Normal) { var newtxt = ""; var numUp = 0; var numMid = 0; var numDown = 0; switch (size) { case ZalgoSize.Mini: numUp = Rnd.Next(1, 8); numMid = Rnd.Next(1, 2); numDown = Rnd.Next(1, 8); break; case ZalgoSize.Normal: numUp = Rnd.Next(1, 16) / 2 + 1; numMid = Rnd.Next(1, 6) / 2; numDown = Rnd.Next(1, 16) / 2 + 1; break; case ZalgoSize.Maxi: numUp = Rnd.Next(1, 64) / 4 + 3; numMid = Rnd.Next(1, 16) / 4 + 1; numDown = Rnd.Next(1, 64) / 4 + 3; break; } for (var j = 0; j < numUp; j++) { newtxt += RandZalgo(ZalgoUp); } for (var j = 0; j < numMid; j++) { newtxt += RandZalgo(ZalgoMid); } for (var j = 0; j < numDown; j++) { newtxt += RandZalgo(ZalgoDown); } return(newtxt); }