suve

awful: function: ordu

Declaration

int :ordu ( string $UTFCHAR )

Summary

Returns the numeric value of the first codepoint in an UTF-8 encoded string.
If the sequence is not valid UTF-8, -1 will be returned.

Example

# Translate a UTF-8 codepoint to a number.
:set &CHAR s''
:read &CHAR
:writeln s'ordu(' $CHAR s') = ' :ordu $CHAR

wikipage modified on 2014/0601/2317