teach-ict.com logo

THE education site for computer science and ICT

String handling

1. Introduction to strings

One of the basic data types in programming is the 'string'.

A string variable stores text rather than a number. The string is made up of a set of characters that can also include spaces, symbols and numbers.

Examples of strings

                    "a"
                    "this is a string"
                    "0145955"
                    "this is a string with numbers 1223"
                    "*$&££^"((*££&&*$$$"

Most programming languages have a number of handy functions to manipulate strings. These will be discussed in this section.