about summary refs log tree commit diff
path: root/IrcStates/Casemap.cs
diff options
context:
space:
mode:
Diffstat (limited to 'IrcStates/Casemap.cs')
-rw-r--r--IrcStates/Casemap.cs11
1 files changed, 3 insertions, 8 deletions
diff --git a/IrcStates/Casemap.cs b/IrcStates/Casemap.cs
index 484c490..67867c5 100644
--- a/IrcStates/Casemap.cs
+++ b/IrcStates/Casemap.cs
@@ -17,10 +17,7 @@ namespace IrcStates
 
         private static string Replace(string s, string upper, string lower)
         {
-            for (var i = 0; i < upper.Length; ++i)
-            {
-                s = s.Replace(upper[i], lower[i]);
-            }
+            for (var i = 0; i < upper.Length; ++i) s = s.Replace(upper[i], lower[i]);
 
             return s;
         }
@@ -28,14 +25,12 @@ namespace IrcStates
         public static string CaseFold(CaseMapping mapping, string s)
         {
             if (s != null)
-            {
                 return mapping switch
                 {
                     CaseMapping.Rfc1459 => Replace(s, Rfc1459UpperChars, Rfc1459LowerChars),
-                    CaseMapping.Ascii => Replace(s, AsciiUpperChars, AsciiLowerChars),
-                    _ => throw new ArgumentOutOfRangeException(nameof(mapping), mapping, null)
+                    CaseMapping.Ascii   => Replace(s, AsciiUpperChars, AsciiLowerChars),
+                    _                   => throw new ArgumentOutOfRangeException(nameof(mapping), mapping, null)
                 };
-            }
 
             return string.Empty;
         }