package fmlib_parse
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=9efb96fe5c1cfb4edc2ff5c6df4537ce9ded12175a60021e9d482e51eb69ebfb
md5=3fb18b650cfcb0bf3bd05e120e17b28f
doc/fmlib_parse/Fmlib_parse/Utf8/Decoder/index.html
Module Utf8.Decoder
A character decoder has some valid initial value init. In order to decode a character bytes has to be pushed into the decoder by put until the decoder is either complete (is_complete) or has encoutered some decoding error (has_error).
If the decoding is complete the decoded unicode character is returned by uchar. As long as the scan is not complete or if the scan has encountered some decoding error the function uchar returns rep = U+FFFD.
val is_complete : t -> boolHas the unicode character been completely scanned?
val has_error : t -> boolHas the scanning of the unicode character encountered an encoding error?
The unicode character. In case of an error or a not yet completed scan, the unicode character rep = U+FFFD is returned.
val scalar : t -> intThe scalar value of the unicode character.
val width : t -> intThe visible width of the unicode character.
val byte_width : t -> intNumber of bytes used during decoding.
val is_newline : t -> boolIs the decoded character a newline character?
val init : tInitial value representing the completely scanned unicode character U+0000.
The following assertions are valid:
is_complete initnot (has_error init)