Last active
August 29, 2015 13:57
-
-
Save onigra/9804622 to your computer and use it in GitHub Desktop.
ギャル文字変更スクリプトruby版 https://twitter.com/upgrade_ayp/status/449036965619310592
This file contains hidden or 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
class String | |
def to_ayp | |
ayp_dic = { | |
'あ' => 'ぁ', | |
'い' => 'ぃ', | |
'う' => 'ぅ', | |
'え' => 'ぇ', | |
'お' => 'ぉ', | |
'や' => 'ゃ', | |
'ゆ' => 'ゅ', | |
'よ' => 'ょ', | |
'わ' => 'ゎ', | |
'つ' => 'っ', | |
'は' => 'ゎ', | |
'。' => 'o' | |
} | |
ayp_dic.each do |before, after| | |
self.gsub!(/#{before}/, after) | |
end | |
self | |
end | |
end |
uru-bns
commented
Mar 27, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment