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
    @[reducible, inline]

    Maximum valid code point value

    Equations
    Instances For
      @[reducible, inline]

      Minimum high surrogate code point

      Equations
      Instances For
        @[reducible, inline]

        Maximum high surrogate code point

        Equations
        Instances For
          @[reducible, inline]

          Minimum low surrogate code point

          Equations
          Instances For
            @[reducible, inline]

            Maximum low surrogate code point

            Equations
            Instances For
              @[reducible, inline]

              Minimum surrogate code point

              Equations
              Instances For
                @[reducible, inline]

                Maximum surrogate code point

                Equations
                Instances For

                  Raw 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

                        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 #

                          General category (GC)

                          A value of this type is a set of general categories. Derived categories (such as GC.L) are unions of basic categories (such as GC.Lu), GC.none is the empty set and GC.univ is the set of all categories.

                          Unicode property: General_Category

                          Equations
                          Instances For
                            @[instance_reducible]
                            Equations
                            @[instance_reducible]
                            Equations
                            @[instance_reducible]
                            Equations
                            @[instance_reducible]
                            Equations
                            @[reducible, inline]
                            Equations
                            Instances For
                              @[reducible, inline]
                              Equations
                              Instances For
                                @[reducible, inline]
                                Equations
                                Instances For
                                  @[reducible, inline]
                                  Equations
                                  Instances For
                                    @[reducible, inline]
                                    Equations
                                    Instances For
                                      @[reducible, inline]
                                      Equations
                                      Instances For
                                        @[reducible, inline]
                                        Equations
                                        Instances For
                                          @[reducible, inline]
                                          Equations
                                          Instances For
                                            @[reducible, inline]
                                            Equations
                                            Instances For
                                              @[reducible, inline]
                                              Equations
                                              Instances For
                                                @[reducible, inline]
                                                Equations
                                                Instances For
                                                  @[reducible, inline]
                                                  Equations
                                                  Instances For
                                                    @[reducible, inline]
                                                    Equations
                                                    Instances For
                                                      @[reducible, inline]
                                                      Equations
                                                      Instances For
                                                        @[reducible, inline]
                                                        Equations
                                                        Instances For
                                                          @[reducible, inline]
                                                          Equations
                                                          Instances For
                                                            @[reducible, inline]
                                                            Equations
                                                            Instances For
                                                              @[reducible, inline]
                                                              Equations
                                                              Instances For
                                                                @[reducible, inline]
                                                                Equations
                                                                Instances For
                                                                  @[reducible, inline]
                                                                  Equations
                                                                  Instances For
                                                                    @[reducible, inline]
                                                                    Equations
                                                                    Instances For
                                                                      @[reducible, inline]
                                                                      Equations
                                                                      Instances For
                                                                        @[reducible, inline]
                                                                        Equations
                                                                        Instances For
                                                                          @[reducible, inline]
                                                                          Equations
                                                                          Instances For
                                                                            @[reducible, inline]
                                                                            Equations
                                                                            Instances For
                                                                              @[reducible, inline]
                                                                              Equations
                                                                              Instances For
                                                                                @[reducible, inline]
                                                                                Equations
                                                                                Instances For
                                                                                  @[reducible, inline]
                                                                                  Equations
                                                                                  Instances For
                                                                                    @[reducible, inline]
                                                                                    Equations
                                                                                    Instances For
                                                                                      @[reducible, inline]
                                                                                      Equations
                                                                                      Instances For
                                                                                        @[reducible, inline]
                                                                                        Equations
                                                                                        Instances For
                                                                                          @[reducible, inline]
                                                                                          Equations
                                                                                          Instances For
                                                                                            @[reducible, inline]
                                                                                            Equations
                                                                                            Instances For
                                                                                              @[reducible, inline]
                                                                                              Equations
                                                                                              Instances For
                                                                                                @[reducible, inline]
                                                                                                Equations
                                                                                                Instances For
                                                                                                  @[reducible, inline]
                                                                                                  Equations
                                                                                                  Instances For
                                                                                                    @[reducible, inline]
                                                                                                    Equations
                                                                                                    Instances For
                                                                                                      @[reducible, inline]
                                                                                                      Equations
                                                                                                      Instances For
                                                                                                        @[inline]
                                                                                                        Equations
                                                                                                        Instances For
                                                                                                          def Unicode.GC.reprPrec (x : GC) (prec : Nat) :
                                                                                                          Equations
                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                          Instances For
                                                                                                            @[instance_reducible]
                                                                                                            Equations
                                                                                                            Equations
                                                                                                            Instances For
                                                                                                              @[instance_reducible]
                                                                                                              Equations
                                                                                                              Equations
                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                              Instances For
                                                                                                                Equations
                                                                                                                Instances For
                                                                                                                  Equations
                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                  Instances For
                                                                                                                    Equations
                                                                                                                    Instances For

                                                                                                                      Numeric Type and Value #

                                                                                                                      Unicode numeric type

                                                                                                                      Unicode properties: Numeric_Type, Numeric_Value

                                                                                                                      Instances For
                                                                                                                        Equations
                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                        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
                                                                                                                                  @[instance_reducible]
                                                                                                                                  Equations
                                                                                                                                  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.

                                                                                                                                    Decomposition mapping

                                                                                                                                    Unicode properties: Decomposition_Type, Decomposition_Mapping

                                                                                                                                    Instances For
                                                                                                                                      Equations
                                                                                                                                      Instances For
                                                                                                                                        Equations
                                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                                        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 minus signs

                                                                                                                                          • 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)

                                                                                                                                          • rightToLeftEmbedding : 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-to-left 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
                                                                                                                                            @[instance_reducible]
                                                                                                                                            Equations
                                                                                                                                            @[reducible, match_pattern, inline, deprecated Unicode.BidiClass.rightToLeftEmbedding (since := "2026-10-06")]
                                                                                                                                            Equations
                                                                                                                                            Instances For

                                                                                                                                              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
                                                                                                                                                                                      @[instance_reducible]
                                                                                                                                                                                      Equations

                                                                                                                                                                                      Scripts #

                                                                                                                                                                                      @[inline]

                                                                                                                                                                                      Check if valid script identifier

                                                                                                                                                                                      A valid script identifier consists of an uppercase letter followed by three lowercase letters.

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

                                                                                                                                                                                        Script identifier type

                                                                                                                                                                                        A script is identified by its four-letter ISO 15924 code, such as Latn for Latin. Use Script.ofAbbrev? and Script.toAbbrev to convert from and to this code.

                                                                                                                                                                                        Instances For
                                                                                                                                                                                          def Unicode.instDecidableEqScript.decEq (x✝ x✝¹ : Script) :
                                                                                                                                                                                          Decidable (x✝ = x✝¹)
                                                                                                                                                                                          Equations
                                                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                                                          Instances For
                                                                                                                                                                                            Equations
                                                                                                                                                                                            Instances For
                                                                                                                                                                                              @[instance_reducible]

                                                                                                                                                                                              Default value is Zzzz (Unknown)

                                                                                                                                                                                              Equations
                                                                                                                                                                                              @[extern unicode_script_to_abbrev]

                                                                                                                                                                                              String abbreviation of script

                                                                                                                                                                                              Equations
                                                                                                                                                                                              Instances For

                                                                                                                                                                                                Get script from abbreviation

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

                                                                                                                                                                                                  Get script from abbreviation

                                                                                                                                                                                                  Equations
                                                                                                                                                                                                  Instances For

                                                                                                                                                                                                    Check if an array of scripts is strictly sorted by script code

                                                                                                                                                                                                    Equations
                                                                                                                                                                                                    Instances For

                                                                                                                                                                                                      Set of scripts, such as the scripts a character is commonly used with

                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                        Equations
                                                                                                                                                                                                        Instances For
                                                                                                                                                                                                          @[instance_reducible]

                                                                                                                                                                                                          Default value is the empty set

                                                                                                                                                                                                          Equations
                                                                                                                                                                                                          @[inline]

                                                                                                                                                                                                          List of the scripts in the set, sorted by script code

                                                                                                                                                                                                          Equations
                                                                                                                                                                                                          Instances For

                                                                                                                                                                                                            String of the script abbreviations in the set, separated by spaces

                                                                                                                                                                                                            Equations
                                                                                                                                                                                                            Instances For
                                                                                                                                                                                                              @[inline]

                                                                                                                                                                                                              Check whether a script is in the set

                                                                                                                                                                                                              Equations
                                                                                                                                                                                                              Instances For