Created
December 26, 2011 06:08
-
-
Save TonnyXu/1520607 to your computer and use it in GitHub Desktop.
generate Unicode characters as you want
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! GenerateUnicode(first, last) | |
let i = a:first | |
while i <= a:last | |
" you can change the format, here \'%04X\' => \' is used to output the value and make it avaiable for php. | |
let c = printf("\'%04X\' => \'", i) | |
for j in range(16) | |
let c = c . nr2char(i) | |
let i += 1 | |
endfor | |
" also, append \', to the end of line, to make it php compatable. | |
let d = printf("\'%s", ",") | |
let c = c . d | |
$put = c | |
endwhile | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment