Last active
October 15, 2016 12:35
-
-
Save rbtnn/3de8c4d3170c4f3f5c97040b79c1652a to your computer and use it in GitHub Desktop.
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
function! s:main() abort | |
let s = '中華料理画像うpよろしく' | |
let cs = split(s, '\zs') | |
let i = 0 | |
while i < len(cs) | |
if i == 0 | |
echomsg s | |
elseif i == len(cs) - 1 | |
echomsg join(reverse(cs), '') | |
else | |
echomsg cs[i] . repeat('@', len(cs) - 2) . cs[-i - 1] | |
endif | |
let i = i + 1 | |
endwhile | |
endfunction | |
call s:main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment