You need more than a bunch of numbers and logic to write an application. You need text and working with individual characters isn’t enough either.

In some languages, a string is nothing more than an array of chars that ends with a special null value. Other languages give you much more powerful strings that blend into the language seamlessly. And some languages store strings as a linked list of characters.

A good string type will behave just like any other data type. You shouldn’t need to treat them any differently. For example, you can add the two numbers five and five to get the value ten. You should be able to add the two strings “pro” and “gram” to get the word “program” and this operation should use the same operator plus that the numbers used.

This topic will describe 21 points and be split into three episodes. The first seven points are:

  1. What are string literals?
  2. How are single and double quotes used?
  3. What are escape sequences and why are they needed?
  4. Is the string immutable or mutable?
  5. Is the string null-terminated or capable of containing binary data?
  6. Is the string empty or null?
  7. What’s the difference between the length of strings in character count vs. byte count?