CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 01:10:31 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=719b875fa21ace6f50db8a97d55a155a33af5bac20055db37cae55147e578fafa%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%225_vRiDzt42LaxW4dreWZYQNqTJEtMJ9s%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d2b7cc993a1f95-BLR
Transliteration - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- The utility reads characters from stdin, removes the characters
- -- that are not needed, replaces spaces with underscores and replaces
- -- Cyrillic letters with the corresponding Latin letters or their
- -- combinations. Then it sends the result to stdout.
- import Data.Char (toLower, ord)
- import System.Exit (die)
- import qualified Data.Set as Set
- main :: IO ()
- main = do
- input <- getContents
- if null input
- then die "No input!"
- else
- mapM_ (putStrLn .
- cyrillicToLatin .
- spacesToUnderscores .
- extraCharsToHyphens .
- stringToLower) $
- lines input
- stringToLower :: String -> String
- stringToLower = map toLower
- requiredChars :: String
- requiredChars = [' ', '-', '_'] ++ ['0' .. '9'] ++ ['A' .. 'Z'] ++ ['a' .. 'z'] ++ ['А' .. 'Ё'] ++ ['а' .. 'ё']
- cyrillicReplacements :: [String]
- cyrillicReplacements = ["a", "b", "v", "g", "d", "ye", "zh", "z", "i", "j", "k", "l", "m", "n", "o", "p", "r", "s", "t", "u", "f", "h", "ts", "ch", "sh", "shch", "-", "y", "-", "e", "yu", "ya", "-", "yo"]
- requiredCharsSet :: Set.Set Char
- requiredCharsSet = Set.fromList requiredChars
- extraCharsToHyphens :: String -> String
- extraCharsToHyphens = map (\x -> if Set.member x requiredCharsSet then x else '-')
- spacesToUnderscores :: String -> String
- spacesToUnderscores [] = []
- spacesToUnderscores (x:xs)
- | x == ' ' = '_' : spacesToUnderscores xs
- | otherwise = x : spacesToUnderscores xs
- cyrillicToLatin :: String -> String
- cyrillicToLatin [] = []
- cyrillicToLatin (x:xs) = aux x ++ cyrillicToLatin xs
- where
- aux char
- | char `elem` ['а' .. 'ё'] = cyrillicReplacements !! (ord char - 1072)
- | otherwise = [char]
Advertisement
Add Comment
Please, Sign In to add comment
-
Free Crypto Method (NEVER SEEN BEFORE)⭐⭐ F
JavaScript | 6 sec ago | 0.25 KB
-
⭐✅ Swapzone Glitch ✅ Working ⭐⭐ L
JavaScript | 15 sec ago | 0.25 KB
-
📌 Swapzone +37% glitch
JavaScript | 21 sec ago | 0.24 KB
-
📌 Swapzone +37% glitch ⭐ W
JavaScript | 23 sec ago | 0.25 KB
-
✅ Make $2500 in 20 minutes⭐⭐⭐ 7
JavaScript | 24 sec ago | 0.25 KB
-
📝 Exchange profit method
JavaScript | 30 sec ago | 0.24 KB
-
✅⭐ Make huge profits on trading ⭐⭐ P
JavaScript | 33 sec ago | 0.25 KB
-
📌 Swapzone +37% glitch ⭐ 6
JavaScript | 33 sec ago | 0.25 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand