string input = "facebook@gmail.com"; int index = input.IndexOf('@'); string output = input; if (index > 3) { output = input.Substring(0, 2) + new string('*', index - 2) + input.Substring(index); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)