Dart-programming-string-property-codeunits
提供:Dev Guides
文字列プロパティcodeUnits
指定された文字列のUTF-16コード単位のリストを返します。
構文
例
次の output -が生成されます。
指定された文字列のUTF-16コード単位のリストを返します。
String.codeUnits
void main() {
String str = "Hello";
print(str.codeUnits);
}
次の output -が生成されます。
[72, 101, 108, 108, 111]