mirror of
https://github.com/wahyd4/dotfiles.git
synced 2026-08-21 18:55:58 +10:00
Added codepoint function
This commit is contained in:
@@ -62,4 +62,9 @@ function escape() {
|
||||
function unidecode() {
|
||||
perl -e "binmode(STDOUT, ':utf8'); print \"$@\""
|
||||
echo # newline
|
||||
}
|
||||
|
||||
# Get a character's unicode codepoint
|
||||
function codepoint() {
|
||||
perl -e "use utf8; print sprintf('U+%04X', ord(\"$@\"))"
|
||||
}
|
||||
Reference in New Issue
Block a user