package batteries
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=e4b70d1a716f0aaba36f419f618d0a2e
sha512=a31f1f8cf2c7c3c6c757f3bfae98ff61bb32bab6a1f1e215937df42bcfa447aad41a37edb28d7bcecb88b3838ed8bd57142bcf8e2d28e09bb538055fd8a3b72d
doc/batteries.unthreaded/BatChar/index.html
Module BatChar
Operations on characters.
Characters range upon Latin-1 encoding, i.e. languages used in Western Europe and North America. For international characters, another, richer, module is provided: UChar.
Return a string representing the given character, with special characters escaped following the lexical conventions of OCaml.
Convert the given character to its equivalent lowercase character, using the US-ASCII character set.
Convert the given character to its equivalent uppercase character, using the US-ASCII character set.
Determine if a character is a whitespace. Whitespace characters are defined as ' ', '\010', '\013', '\009', '\026' and '\012'.
Determine if a character is uppercase ASCII. A character is uppercase ASCII if it is between 'A' and 'Z'
Determine if a character is lowercase ASCII. A character is lowercase ASCII if it is between 'a' and 'z'
Determine if a character is uppercase Latin 1. A character is uppercase Latin 1 if it is between 'A' and 'Z', between 'À' and 'Ö' or between 'Ø' and 'Ý'
Determine if a character is lowercase Latin 1. A character is lowercase Latin 1 if it is between 'a' and 'z', between 'Þ' and 'ö' or between 'ø' and 'ÿ'
Determine if a character is a Latin 1 letter. A character is a Latin 1 letter if it is either an uppercase or a lowercase Latin 1 character.
Determine if a character represents a digit. Digits are '0', '1', ... '9'.
Determine if a character represents a (OCaml-style) symbol. Symbols are '!', '%', '&', '$', '#', '+', '-', '/', ':', '<', '=' '>', '?', '@', '\\', '~', '^', '|', '*'
Determine if a character is a newline. Newline characters are defined as '\010' and '\013'
val enum : unit -> char BatEnum.tProduce the enumeration of all characters
val range : ?until:char -> char -> char BatEnum.trange from ?until produces an enumeration of the characters from from to until included until defaults to '\255'
val (--) : char -> char -> char BatEnum.tProduce the enumeration of a segment of characters.
'a' -- 'z' is the enumeration of all characters between 'a' and 'z' included.
module Infix : sig ... endBoilerplate code
val print : 'a BatInnerIO.output -> Char.t -> unitThe comparison function for characters, with the same specification as Pervasives.compare. Along with the type t, this function compare allows the module Char to be passed as argument to the functors Set.Make and Map.Make.
val hash : t -> intval ord : char BatOrd.ordmodule Incubator : sig ... end