String Manipulation

String manipulation is needed for structuring input and for formatting output. It is important for websites, search engines, word processing, the inter-conversion of file formats (e.g. XML, HTML, PDF and CSV) and for the translation of source code and of languages. This tutorial has sections on character coding schemes, Pascal string routines and the processing of text files.

You need to be familiar with character coding schemes in order to select an appropriate string routine from the many available. A Pascal string can be treated as an array of characters, and this enables you to write code giving the same results as built-in routines.

In the section on routines, we begin with those that you are expected to know and then cover more specialised ones that could be useful for coursework. We provide references to the documentation of further routines and challenge you to look them up for yourself and use them.

The section on the processing of text files demonstrates several of the routines and techniques described in previous sections. It includes some processing of CSV, Pascal and HTML files. This section is certainly aimed at stretching the most able, so do not be discouraged if it is far too difficult for you now. It offers plenty of scope for talented individuals to attempt challenging projects.

Continue with the following topics to learn more:

Programming - a skill for life!

Pascal Programming Tutorials