package merlin-lib
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=b0dcad092aaaf7a23f65ab9a089e8761bd665cc72357909e0ac6c2182f4fc2d4
sha512=9987baf2b2e82bab4c90a328bfcba9945e797e0f3d947156f04435ee84b49542844b379e35a79027c3ffe81f4b7a8f1c60803233999b4c039d4598033371880d
doc/merlin-lib.utils/Merlin_utils/Misc/Utf8_lexeme/index.html
Module Misc.Utf8_lexeme
Source
Normalize the given UTF-8 encoded string. Invalid UTF-8 sequences results in a error and are replaced by U+FFFD. Identifier characters are put in NFC normalized form. Other Unicode characters are left unchanged.
Like normalize
, but if the string starts with a lowercase identifier character, it is replaced by the corresponding uppercase character. Subsequent characters are not changed.
Like normalize
, but if the string starts with an uppercase identifier character, it is replaced by the corresponding lowercase character. Subsequent characters are not changed.
Returns true
if the given normalized string starts with an uppercase identifier character, false
otherwise. May return wrong results if the string is not normalized.
Check whether the given normalized string is a valid OCaml identifier:
- all characters are identifier characters
- it does not start with a digit or a single quote
Returns true
if the given normalized string only contains lowercase identifier character, false
otherwise. May return wrong results if the string is not normalized.
Like is_valid_identifier
, but returns a more detailed error code. Dots can be allowed to extend support to path-like identifiers.