String codeUnitAt, méthode
Renvoie l'unité de code UTF-16 16 bits à l'index donné.
Syntaxe
String.codeUnitAt(int index)
Paramètre
Index - représente l'index d'un caractère dans la chaîne.
Type de retour
Renvoie un entier.
Exemple
void main() {
var res = "Good Day";
print("Code Unit of index 0 (G): ${res.codeUnitAt(0)}");
}
Il produira ce qui suit output -.
Code Unit of index 0 (G): 71