-
-
Save davatron5000/9d2bff8e37762e2b2b67 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
struct もじれつ: Printable { | |
let description: String | |
init(string: String) { | |
var mutableString = NSMutableString(string: string) as CFMutableString | |
if CFStringTransform(mutableString, nil, kCFStringTransformLatinHiragana, 0) == 1 { | |
self.description = mutableString as NSString | |
} else { | |
self.description = string | |
} | |
} | |
} | |
extension もじれつ: StringLiteralConvertible { | |
_._ | |
_.-="_- _ | |
_.-=" _- | ||"""""""---._______ __.. | |
___.===""""-.______-,,,,,,,,,,,,`-''----" """"" """"" __' | |
__.--"" __ ,' o \ __ [__| | |
__-""=======.--"" ""--.=================================.--"" ""--.=======: | |
] [w] : / \ : |========================| : / \ : [w] : | |
V___________:| |: |========================| :| |: _-" | |
V__________: \ / :_|=======================/_____: \ / :__-" | |
-----------' ""____"" `-------------------------------' ""____"" | |
} | |
let s: もじれつ = "hiragana" // ひらがな |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment