Documentation

UnicodeBasic.Types

unsafe def Char.mkUnsafe :

Low-level conversion from UInt32 to Char (unsafe)

This function translates to a no-op in the compiler. However, it does not check whether the UInt32 code is a valid Char value. Only use where it's known for external reasons that the code is valid.

Equations
Instances For

    Coercion from String to Substring

    This coercion is in Batteries but not in Lean. It is scoped to Unicode here to avoid issues in low-level packages that don't use Batteries.

    Equations
    Instances For

      Maximum valid code point value

      Equations
      Instances For

        Hexadecimal string representation of a code point

        Same as toHexString but without the U+ prefix.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          @[inline]

          Hexadecimal string representation of a code point

          Prefix U+ followed by at least four uppercase hexadecimal digits (e.g. U+0123 and U+4B0A1 but neither U+123 nor U+4b0a1).

          Equations
          Instances For

            Get code point from hexadecimal string representation

            For convenience, the U+ prefix may be omitted and lowercase hexadecimal digits are accepted.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              @[inline]

              Get value of hex digit

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                Get code point from hexadecimal string representation

                For convenience, the U+ prefix may be omitted and lowercase hexadecimal digits are accepted.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  General Category #

                  Major general category (L, M, N, P, S, Z, C)

                  Unicode property: General_Category

                  Instances For

                    Minor general category

                    Unicode property: General_Category

                    Instances For

                      General category of a code point

                      Unicode property: General_Category

                      Instances For

                        General category: letter (L)

                        Equations
                        Instances For

                          General category mark (M)

                          Equations
                          Instances For

                            General category: number (N)

                            Equations
                            Instances For

                              General category: punctuation (P)

                              Equations
                              Instances For

                                General category: symbol (S)

                                Equations
                                Instances For

                                  General category: separator (Z)

                                  Equations
                                  Instances For

                                    General category: other (C)

                                    Equations
                                    Instances For

                                      String abbreviation for general category

                                      Instances For

                                        Get general category from string abbreviation

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For

                                          Get general category from string abbreviation

                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For
                                            Equations
                                            • One or more equations did not get rendered due to their size.

                                            Numeric Type and Value #

                                            Unicode numeric type

                                            Unicode properties: Numeric_Type, Numeric_Value

                                            Instances For

                                              Decimal digit type

                                              The character is part of a sequence of contiguous code points representing decimal digits 0 through 9.

                                              Unicode property: Numeric_Type

                                              Equations
                                              Instances For

                                                Digit type

                                                The character represents a decimal digit 0 through 9.

                                                Unicode property: Numeric_Type

                                                Equations
                                                Instances For

                                                  Get the value of a numeric type

                                                  Returns either an integer value or a numerator-denominator pair representing a rational value.

                                                  Unicode property: Numeric_Value

                                                  Equations
                                                  Instances For

                                                    Decomposition Mapping #

                                                    Compatibility format tag

                                                    Unicode properties: Decomposition_Type, Decomposition_Mapping

                                                    Instances For
                                                      Equations
                                                      Equations
                                                      • One or more equations did not get rendered due to their size.

                                                      Decomposition maping

                                                      Unicode properties: Decomposition_Type, Decomposition_Mapping

                                                      Instances For

                                                        Bidirectional Class #

                                                        Bidirectional class

                                                        Unicode property: Bidi_Class

                                                        • leftToRight : BidiClass

                                                          (L) strong left-to-right character

                                                        • rightToLeft : BidiClass

                                                          (R) strong right-to-left (non-Arabic-type) character

                                                        • arabicLetter : BidiClass

                                                          (AL) strong right-to-left (Arabic-type) character

                                                        • europeanNumber : BidiClass

                                                          (EN) ASCII digit or Eastern Arabic-Indic digit

                                                        • europeanSeparator : BidiClass

                                                          (ES) European separator: plus and

                                                        • europeanTerminator : BidiClass

                                                          (ET) European terminator in a numeric format context, includes currency signs

                                                        • arabicNumber : BidiClass

                                                          (AN) Arabic-Indic digit

                                                        • commonSeparator : BidiClass

                                                          (CS) common separator: commas, colons, and slashes

                                                        • nonspacingMark : BidiClass

                                                          (NSM) nonspacing mark

                                                        • boundaryNeutral : BidiClass

                                                          (BN) boundary neutral: most format characters, control codes, or noncharacters

                                                        • paragraphSeparator : BidiClass

                                                          (B) paragraph separator, various newline characters

                                                        • segmentSeparator : BidiClass

                                                          (S) segment separator, various segment-related control codes

                                                        • whiteSpace : BidiClass

                                                          (WS) white spaces

                                                        • otherNeutral : BidiClass

                                                          (ON) other neutral: most other symbols and punctuation marks

                                                        • leftToRightEmbedding : BidiClass

                                                          (LRE) left to right embedding (U+202A: the LR embedding control)

                                                        • leftToRightOverride : BidiClass

                                                          (LRO) Left_To_Right_Override (U+202D: the LR override control)

                                                        • rightToLeftEmbeding : BidiClass

                                                          (RLE) right-to-left embedding (U+202B: the RL embedding control)

                                                        • rightToLeftOverride : BidiClass

                                                          (RLO) right-to-left override (U+202E: the RL override control)

                                                        • popDirectionalFormat : BidiClass

                                                          (PDF) pop directional format (U+202C: terminates an embedding or override control)

                                                        • leftToRightIsolate : BidiClass

                                                          (LRI) left-to-right isolate (U+2066: the LR isolate control)

                                                        • rightToLeftIsolate : BidiClass

                                                          (RLI) right-toleft isolate (U+2067: the RL isolate control)

                                                        • firstStrongIsolate : BidiClass

                                                          (FSI) first strong isolate (U+2068: the first strong isolate control)

                                                        • popDirectionalIsolate : BidiClass

                                                          (PDI) pop directional isolate (U+2069: terminates an isolate control)

                                                        Instances For
                                                          Equations

                                                          Bidi class: strong left-to-right (L)

                                                          Equations
                                                          Instances For

                                                            Bidi class: strong right-to-left (R)

                                                            Equations
                                                            Instances For

                                                              Bidi class: european number (EN)

                                                              Equations
                                                              Instances For

                                                                Bidi class: european separator (ES)

                                                                Equations
                                                                Instances For

                                                                  Bidi class: european terminator (ET)

                                                                  Equations
                                                                  Instances For

                                                                    Bidi class: common separator (CS)

                                                                    Equations
                                                                    Instances For

                                                                      Bidi class: boundary neutral (BN)

                                                                      Equations
                                                                      Instances For

                                                                        Bidi class: paragraph separator (B)

                                                                        Equations
                                                                        Instances For

                                                                          Bidi class: segment separator (S)

                                                                          Equations
                                                                          Instances For

                                                                            Bidi class: left-to-right embedding (LRE)

                                                                            Equations
                                                                            Instances For

                                                                              Bidi class: left-to-right override (LRO)

                                                                              Equations
                                                                              Instances For

                                                                                Bidi class: right-to-left embedding (RLE)

                                                                                Equations
                                                                                Instances For

                                                                                  Bidi class: right-to-left override (RLO)

                                                                                  Equations
                                                                                  Instances For

                                                                                    Bidi class: pop directional format (PDF)

                                                                                    Equations
                                                                                    Instances For

                                                                                      Bidi class: left-to-right isolate (LRI)

                                                                                      Equations
                                                                                      Instances For

                                                                                        Bidi class: right-to-left isolate (RLI)

                                                                                        Equations
                                                                                        Instances For

                                                                                          Bidi class: first strong isolate (FSI)

                                                                                          Equations
                                                                                          Instances For

                                                                                            Bidi class: pop directional isolate (PDI)

                                                                                            Equations
                                                                                            Instances For

                                                                                              Get bidi class from abbreviation

                                                                                              Equations
                                                                                              • One or more equations did not get rendered due to their size.
                                                                                              Instances For

                                                                                                Get bidi class from abbreviation

                                                                                                Equations
                                                                                                • One or more equations did not get rendered due to their size.
                                                                                                Instances For
                                                                                                  Equations

                                                                                                  Structure for data from UnicodeData.txt

                                                                                                  Instances For
                                                                                                    Equations
                                                                                                    • One or more equations did not get rendered due to their size.