VOOZH about

URL: https://www.geeksforgeeks.org/dart/dart-string-codeunits-property/

⇱ Dart - String codeUnits Property - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Dart - String codeUnits Property

Last Updated : 14 Jul, 2020

The string property codeunits in Dart programming language returned the list of UTF-16 code of the characters of a string. It is very useful string properties to directly find UTF-16 code units.
 

Syntax: String.codeUnits

Returns: a list of UTF-16 code units


Example 1:
 

Output: 

[71, 101, 101, 107, 115, 102, 111, 114, 103, 101, 101, 107, 115]


Example 2: 
 

Output: 

[67, 111, 109, 112, 117, 116, 101, 114]
Comment
Article Tags:
Article Tags:

Explore