String Propriété codeUnits

Renvoie une liste des unités de code UTF-16 d'une chaîne donnée.

Syntaxe

String.codeUnits

Exemple

void main() { 
   String str = "Hello"; 
   print(str.codeUnits); 
}

Il produira ce qui suit output -.

[72, 101, 108, 108, 111]