Stream types for Unicode Character Database (UCD) files. #
Unicode data files are semicolon ; (U+003B) separated fields, except for
Unihan files and a few others that are tab (U+0009) separated. White spaces
around field values are not significant. Line comments are prefixed with a
number sign # (U+0023).
UCD stream type
Comments and blank lines are omitted in this stream type.
Use UCDStreamWithComments if you need comments.
- startInclusive : self.str.Pos
- endExclusive : self.str.Pos
- isUnihan : Bool
isUnihanis true if the records are tab separated
Instances For
@[instance_reducible]
Equations
@[reducible, inline]
UCD stream type with comments
Comments and blank lines are included in this stream type.
Use UCDStream if you do not need comments.
Instances For
@[reducible, inline]
abbrev
Unicode.UCDStream.ofStringSlice
(str : String.Slice)
(withComments isUnihan : Bool := false)
:
UCDStream withComments
Make a UCDStream from a string slice
Equations
- Unicode.UCDStream.ofStringSlice str withComments isUnihan = { toSlice := str, isUnihan := isUnihan }
Instances For
@[reducible, inline]
abbrev
Unicode.UCDStream.ofString
(str : String)
(withComments isUnihan : Bool := false)
:
UCDStream withComments
Make a UCDStream from a string
Equations
- Unicode.UCDStream.ofString str withComments isUnihan = Unicode.UCDStream.ofStringSlice str.toSlice withComments isUnihan
Instances For
@[reducible, inline]
abbrev
Unicode.UCDStream.ofSubstring
(str : Substring.Raw)
(withComments isUnihan : Bool := false)
:
UCDStream withComments
Make a UCDStream from a substring
Equations
- Unicode.UCDStream.ofSubstring str withComments isUnihan = Unicode.UCDStream.ofStringSlice str.toString.toSlice withComments isUnihan
Instances For
@[reducible, inline]
Make a UCDStream from a file
Equations
- Unicode.UCDStream.ofFile path withComments isUnihan = (fun (str : String) => Unicode.UCDStream.ofString str withComments isUnihan) <$> IO.FS.readFile path
Instances For
def
Unicode.UCDStream.nextLine?
{withComments : Bool}
(stream : UCDStream withComments)
:
Option (String.Slice × String.Slice × UCDStream withComments)
Get the next line from the UCDStream
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.