Julia: 从字符中提取Unicode键

4
在Julian中,我想知道一个字符的具体Unicode键,并将其保存到一个变量中。我该如何做到这一点?
例如,我可以在REPL中写入Unicode字符,它会很乐意告诉我它们的Unicode键。
julia> 'ë'
'ë': Unicode U+00EB (category Ll: Letter, lowercase)

julia> 'e'
'e': ASCII/Unicode U+0065 (category Ll: Letter, lowercase)


如何提取 U+00EBU+0065
1个回答

7
使用codepoint
julia> codepoint('e')
0x00000065

julia> codepoint('ë')
0x000000eb

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接