branch | qmlfrontend |
changeset 11606 | 99966b4a6e1e |
parent 11575 | db7743e2fad1 |
child 11838 | 8f730ba4ca3c |
--- a/gameServer/Utils.hs Tue Feb 09 21:11:16 2016 +0300 +++ b/gameServer/Utils.hs Mon Mar 14 22:08:27 2016 +0300 @@ -241,3 +241,8 @@ deleteFirstsBy2 :: (a -> b -> Bool) -> [a] -> [b] -> [a] deleteFirstsBy2 eq = foldl (flip (deleteBy2 (flip eq))) +sanitizeName :: B.ByteString -> B.ByteString +sanitizeName = B.map sc + where + sc c | isAlphaNum c = c + | otherwise = '_'