Created
April 25, 2016 20:02
-
-
Save NattyNarwhal/16cb31e7ab6dc16a145c661292f7be18 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string TranslateString(this string original, Dictionary<char, char> mapping) | |
{ | |
return new string(original.Select(c => mapping.ContainsKey(c) ? mapping[c] : c).ToArray()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment