Skip to content

Instantly share code, notes, and snippets.

@shailen
Created March 11, 2013 21:26
Show Gist options
  • Save shailen/5137907 to your computer and use it in GitHub Desktop.
Save shailen/5137907 to your computer and use it in GitHub Desktop.

Dart Cookbook

Strings

A Dart string represents a sequence of characters encoded in UTF-16. Decoding UTF-16 yields Unicode code points. Borrowing terminology from Go, Dart uses the term rune for an integer representing a Unicode code point.

Interpolating expressions inside strings

An interpolated string, string ${expression} is equivalent to the concatenation of the strings 'string ' and expression.toString(). Consider this code:

var four = 4;
var seasons = 'The $four seasons'; // 'The 4 seasons'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment