Blyx Nest Blyx language
Registry / Library
library · v0.1.1

Utf8 Width

Return the byte width of a Unicode scalar encoded as UTF-8. Reject surrogate code points and values beyond Unicode.

Source repository · Package JSON

Use Utf8 Width

use vendor::utf8_width::utf8_width;

Run the example

nest demo utf8_width@0.1.1
blyxc native-run utf8_width-demo/main.blyx
Example source and expected output
use vendor::utf8_width::utf8_width;

fn main() {
    println!(utf8_width(128512));
}

Expected output

4

Published versions

VersionPackageSource commitSHA-256
0.1.1Download ZIP · Browse filesc1a859ce06e1aa85be4cdcfbaff6436c3765f3f188928c977c9c95a41c228b9276d320b61b
0.1.0Download ZIP · Browse files6349f23784166349c62a937c290f4b4f4ef97cfc0f1adf9e55b90d49c1bbd1c500c3cc13d1