String Property codeUnits

  • Post author:
  • Post category:Dart
  • Post comments:1 Comment
String Property codeUnits

In this guide, we will discuss String Property codeUnits in Dart Programming Language. Returns a list of the UTF-16 code units of a given string.

Syntax

String.codeUnits

Example

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

It will produce the following output −.

[72, 101, 108, 108, 111] 

Next Topic : Click Here

This Post Has One Comment

Leave a Reply