mirror of
https://github.com/wahyd4/dotfiles.git
synced 2026-08-23 03:35:59 +10:00
Merge pull request #44 from pkruithof/patch-1
.functions: Add `codepoint` function
$ codepoint €
U+20AC
$ codepoint ð
U+00F0
This commit is contained in:
@@ -62,4 +62,10 @@ 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(\"$@\"))"
|
||||
echo # newline
|
||||
}
|
||||
Reference in New Issue
Block a user