projectionValidatedAcpBase64DecodedBytes function
Implementation
int projectionValidatedAcpBase64DecodedBytes(String encoded) {
if (encoded.isEmpty) return 0;
var padding = 0;
if (encoded.codeUnitAt(encoded.length - 1) == 0x3d) padding += 1;
if (encoded.length > 1 && encoded.codeUnitAt(encoded.length - 2) == 0x3d) {
padding += 1;
}
return encoded.length ~/ 4 * 3 - padding;
}