2. All programming languages have predefined functions which allow the
manipulation of text strings. Some examples:
LEFT – get a number of characters at the left of the string
RIGHT – get a number of characters at the right of the string
MID – get a number of characters in the middle of the string
LEN / LENGTH – get the length of the string
toUPPER & toLOWER – convert string to upper or lower case characters
TRIM – remove characters from start or end of string, or remove whitespace
from start or end of a string
Most programming languages will include many more string handling functions.
String Handling
3. String Handling
Example
Duncastle Rugby Club have a computerised system which scans membership
cards and logs the date and time of arrival of members along with the member
name and address. An example string would be:
“13:21 05012016 Johnstone 14 High St, Duncastle DC13 2BZ”
They want the program to display the arrival time of a member on screen when
they scan their card.