package merlin-lib
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=67da3b34f2fea07678267309f61da4a2c6f08298de0dc59655b8d30fd8269af1
sha512=1fb3b5180d36aa82b82a319e15b743b802b6888f0dc67645baafdb4e18dfc23a7b90064ec9bc42f7424061cf8cde7f8839178d8a8537bf4596759f3ff4891873
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.