String codeUnitAt Method


Advertisements

Returns the 16-bit UTF-16 code unit at the given index.

Syntax

String.codeUnitAt(int index)

Parameter

  • Index − represents a character’s index in the string.

Return Type

Returns an integer.

Example

void main() { 
   var res = "Good Day"; 
   print("Code Unit of index 0 (G): ${res.codeUnitAt(0)}");  
}  

It will produce the following output −.

Code Unit of index 0 (G): 71  
dart_programming_string.htm

Useful Video Courses


Video

Dart tutorial for Beginners

44 Lectures 4.5 hours

Sriyank Siddhartha

Video

Flutter Tutorial for Beginners with Dart

34 Lectures 4 hours

Sriyank Siddhartha

Video

Dart Masterclass Programming: iOS/Android Bible

69 Lectures 4 hours

Frahaan Hussain

Video

Flutter & Dart Development For Building iOS and Android Apps

117 Lectures 10 hours

Frahaan Hussain

Video

COMPLETE Google DART Programming- BOOTCAMP

22 Lectures 1.5 hours

Pranjal Srivastava

Video

AWS Mobile with Google Dart

34 Lectures 3 hours

Pranjal Srivastava

Advertisements