mirror of
https://gitlab.com/mfocko/CodeWars.git
synced 2024-10-07 13:52:09 +02:00
12 lines
236 B
C#
12 lines
236 B
C#
public static class Kata
|
|
{
|
|
// return masked string
|
|
public static string Maskify(string cc)
|
|
{
|
|
if (cc.Length <= 4) {
|
|
return cc;
|
|
} else {
|
|
return cc.Substring(cc.Length - 4, 4).PadLeft(cc.Length, '#');
|
|
}
|
|
}
|
|
}
|