DiGrande.it

Blind, Braille and Embossing Technologies

This site uses cookies to personalize content and ads, provide social media features and analyze links. By closing this banner or continuing to browse, you consent to their use.
Read the DiGrande.it Cookie Policy

Previous character (Cp)

Instruction: Cp"%"

Parameter: "%" group of absolute or type characters

Return: true if the previous character matches the specified group

Description:

Returns true if the character before the cursor matches at least one of the characters specified in the group. The characters in the group can be absolute or of a specific type.

An absolute character is one that can be directly compared, for example, "abc123," meaning all characters in the Unicode set.

Type characters are those belonging to a category of characters, such as letters, consonants, vowels, numbers, etc.

A type character is specified using the backslash "" followed by the character type. The list of type characters is as follows:

\* - Any character except space

\w - Any letter or number

\? - Any letter

\# - Any number

\% - Any normal consonant

\$ - Any consonant with diacritic

\z - Any consonant

\& - Any normal vowel

\@ - Any vowel with diacritic

\a - Any vowel

\< - Any lowercase letter

\> - Any uppercase letter

\_ - Any punctuation

\' - Any apostrophe

\- - Any hyphen

\! - Any character other than letters, numbers, and punctuation

\s - Any space

\\ - The backslash itself

\x - Includes space comparison (default flag)

\X - Excludes space comparison. If specified, the comparison index moves backward until a non-space character is encountered

\c - Case-insensitive comparison (default flag)

\C - Case-sensitive comparison

The case sensitivity of these wildcard characters must be respected. If multiple characters are used in the instruction value, they will always be compared to the same character before the cursor until at least one satisfies the comparison.

Example:

Condition: Cp"\&bcd"

Description: Returns true if there is a vowel or one of the letters “bcd” before the cursor.

Condition: Cp".!?"

Description: Returns true if one of the characters “.!?” is present before the cursor.