Skip to content
Justice Tech School

Dart Strings

Strings use single or double quotes. Use $name or ${expression} inside text. Members: length, toUpperCase, substring, contains, replaceAll, split, trim. Triple quotes make multi line strings.

Example
var s = "Hello, Dart";
print(s.length);
print(s.toUpperCase());
print(s.replaceAll("Dart", "World"));
print("Total: ${2 + 3}");

Exercise

Insert a variable.

"Hi name"

Quiz Test

Which symbol interpolates?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.