Text processing

Performs operation on a text character.

Parameters

A1 [in,1u]
Device: kernel - 1
A2 [in,1u]
Message type - 12
A3 [in,1u]
Operation type (see description)
A4 [in,1u(char)]
ASCII character to process

Description

This message performs one of the operations on a given character. It can return new character or a boolean value depending on the operation type. Valid operation types and they results are:

1
Returns uppercase
A4 [out,1u(char)]
Converted character
2
Returns lowercase
A4 [out,1u(char)]
Converted character
3
Checks whether character is alphanumeric (a letter or a digit)
A4 [out,1b]
Returned boolean value
4
Checks whether character is a letter
A4 [out,1b]
Returned boolean value
5
Checks whether character is a whitespace
A4 [out,1b]
Returned boolean value

If you set invalid operation type value, instruction will return 0 in A2.