fromOctal function
Converts 3-bit Base-8 character sequence to 8-bit integer sequence.
Parameters:
input
should be a valid octal/base-8 encoded string.codec
is the Base8Codec to use. Default: Base8Codec.standard.
Throws:
- FormatException if the
input
contains invalid characters.
If a partial string is detected, the following bits are assumed to be zeros.
NOTE:, This implementation is a bit-wise decoding of the input bytes.
To get the bytes from the numeric representation of the input
:
fromBigInt(BigInt.parse(input, radix: 8));
Implementation
Uint8List fromOctal(
String input, {
Base8Codec codec = Base8Codec.standard,
}) {
return codec.decoder.convert(input.codeUnits);
}