Strings in Dart

Recommended time: 4 days

Strings can be found everywhere. String manipulation is one of the most important programming tasks that we perform on a daily basis. As a result, it is critical that you comprehend this lesson. A Dart string is a string made up of UTF 16 code units. In Dart, string values can be represented by single, double, or triple quotes. Single or double quotes are used to represent single line strings. Multi-line strings are represented by triple quotes.

Projects

1. Count number of words in given text

Given a input paragraph of text, count and print the number of words in that text.

  • Receive paragraph of text as user input
  • Count number of words
  • Print number of words

2. Concatenate strings

Write a program that uses string concatenation to combine several strings into a single string, and then prints the result to the console.

Note: for completing projects in this lesson, you might have to look at few resources on next two lessons as well (operators and control flow).

Resources