Variable Utf8Const

Utf8: {
    decodedOutput<T>(output, errorMode?) => Output<T>;
    decodedString() => Output<string>;
    encodedOutput<T_1>(output, errorMode?) => Output<T_1>;
    sizeOf(c, errorMode?) => number;
    sizeOf(c) => number;
    sizeOf(string, errorMode?) => number;
    sizeOf(string) => number;
}

UTF-8 [[Input]]/[[Output]] factory.

Type declaration

  • decodedOutput:function
    • Returns a new Output that accepts UTF-8 code unit sequences, and writes writes decoded Unicode code points to the composed output, handling invalid code unit sequences according to the errorMode policy.

      Type Parameters

      • T

      Parameters

      Returns Output<T>

  • decodedString:function
    • Returns a new Output that accepts UTF-8 code unit sequences, and writes decoded Unicode code points to a growable string, handling invalid code unit sequences according to the [[UtfErrorMode.fatal]] policy. The returned Output accepts an unbounded number of UTF-8 code units, remaining permanently in the cont state, and [[Output.bind binds]] a string containing all decoded code points.

      Returns Output<string>

  • encodedOutput:function
    • Returns a new Output that accepts Unicode code points, and writes encoded UTF-8 code unit sequences to the composed output, handling invalid code unit sequences according to the errorMode policy.

      Type Parameters

      • T_1

      Parameters

      Returns Output<T_1>

  • sizeOf:function
    • Returns the number of bytes in the UTF-8 encoding of the Unicode code point c, handling invalid code unit sequences according to the errorMode policy. Returns the size of the [[UtfErrorMode.replacementChar]] for surrogates and invalid code points, if [[UtfErrorMode.isReplacement]] is true; otherwise returns 0 for surrogates and invalid code points. Uses the two byte modified UTF-8 encoding of the NUL character (U+0000), if [[UtfErrorMode.isNonZero]] is true.

      Parameters

      Returns number

    • Returns the number of bytes in the UTF-8 encoding of the Unicode code point c, handling invalid code unit sequences according to the errorMode policy. Returns the size of the [[UtfErrorMode.replacementChar]] for surrogates and invalid code points, if [[UtfErrorMode.isReplacement]] is true; otherwise returns 0 for surrogates and invalid code points. Uses the two byte modified UTF-8 encoding of the NUL character (U+0000), if [[UtfErrorMode.isNonZero]] is true.

      Parameters

      • c: number

      Returns number

    • Returns the number of bytes in the UTF-8 encoding of the Unicode code point c, handling invalid code unit sequences according to the errorMode policy. Returns the size of the [[UtfErrorMode.replacementChar]] for surrogates and invalid code points, if [[UtfErrorMode.isReplacement]] is true; otherwise returns 0 for surrogates and invalid code points. Uses the two byte modified UTF-8 encoding of the NUL character (U+0000), if [[UtfErrorMode.isNonZero]] is true.

      Parameters

      Returns number

    • Returns the number of bytes in the UTF-8 encoding of the Unicode code point c, handling invalid code unit sequences according to the errorMode policy. Returns the size of the [[UtfErrorMode.replacementChar]] for surrogates and invalid code points, if [[UtfErrorMode.isReplacement]] is true; otherwise returns 0 for surrogates and invalid code points. Uses the two byte modified UTF-8 encoding of the NUL character (U+0000), if [[UtfErrorMode.isNonZero]] is true.

      Parameters

      • string: string

      Returns number

Generated using TypeDoc