Sign InCreate Account

EditorProjectsPseudocode TutorPractice QuestionsCode ConverterCode GeneratorFlowchartsUpgrade

Master Pseudocode with Pro

Get unlimited access to the AI Tutor, Code Generator, and Converters. Plus, enjoy an ad-free experience.

Upgrade Now

String Handling in Pseudocode

In programming, a STRING is a data type used to represent text. Technically, a string is an array of individual characters (CHAR).

Whether you are validating a user's password, formatting a printed receipt, or searching for a keyword in a document, you need to manipulate strings. This process is known as String Handling.

String handling functions differ significantly between specifications. In this guide, we will look at the core actions you can perform on text, and then map out the specific syntax rules for AQA, OCR, and Cambridge (CIE) exam boards.

Table of Contents

Core Concepts: Manipulating Text
Finding the LengthExtracting SubstringsConcatenation (Joining)Type Casting
Syntax Variations by Exam BoardConclusion

Core Concepts: Manipulating Text

Every programming language has built-in functions designed to evaluate and modify strings. Here are the core actions you will be expected to know in your exams.

Finding the Length

Often you need to know exactly how many characters are inside a string (for example, ensuring a password is at least 8 characters long). Length functions return an integer representing the character count, including spaces.

Loading...

Extracting Substrings

A substring is a smaller piece of text carved out of a larger string. To get a substring, you generally need to provide the starting index and the length (how many characters to grab).

Loading...

Concatenation (Joining)

Concatenation is the process of appending one string to the end of another. Most pseudocode standards use the plus + symbol to glue strings together.

Loading...

Type Casting

Sometimes numbers are stored as text (e.g., "50" instead of 50). You cannot perform math on text. Casting functions convert strings into integers/reals, and vice versa.

Loading...

Syntax Variations by Exam Board

Exam boards are incredibly picky about string functions. OCR uses object-oriented methods, while AQA and CIE use procedural built-in functions.

AQA Pseudocode Standard

AQA uses capitalized built-in functions. Notably, it assumes strings are 0-indexed.

  • Length: LEN(str)
  • Substring: SUBSTRING(start, length, str). E.g., SUBSTRING(2, 4, "Computer") returns "mput".
  • Concatenation: +
  • Casting: STRING_TO_INT(), INT_TO_STRING(), CHAR_TO_CODE()
Loading...

OCR Pseudocode Standard

OCR syntax is object-oriented. You append the method to the string variable using a dot. Strings are also 0-indexed.

  • Length: stringname.length
  • Substring: stringname.substring(startingPosition, numberOfCharacters)
  • Casting: str(num), int("5"), float("3.14")
Loading...

Cambridge (CIE / 9618) Standard

CIE uses classic Visual Basic style functions. Crucially, CIE string indexing starts at 1, not 0.

  • Length: LENGTH(str)
  • Substrings: Has three separate functions: LEFT(str, n), RIGHT(str, n), and MID(str, start, length).
  • Case formatting: LCASE(str), UCASE(str)
  • Casting: NUM_TO_STRING(x), STRING_TO_NUM(x)
Loading...

Conclusion

String manipulation is tested heavily in validation questions. If you are asked to check if a password contains a capital letter or ends in a specific domain, you will be using string handling.

Always remember your board's indexing rules. If you use AQA or OCR, the first letter is at index 0. If you are taking a CIE exam, the first letter is at index 1. Mixing these up will cause "off-by-one" logic errors in your answers!

Read Our Guide on
Arrays
in Pseudocode


Ready to practice? Try our editor.

Give our pseudocode editor a go today for free - with a built-in compiler, tools to convert pseudocode to code, and project saving, PseudoEditor makes writing pseudocode easier than ever!

Start coding now

Product

For SchoolsOverviewFeaturesFAQ

© 2026 PseudoEditor. All rights reserved.