Next character in a group- Cg
- Instruction: Cg"%"
- Parameter: "%" one or more absolute characters or of type
- Return: true if the next character belongs to one of the characters in the specified group.
- Description:
Returns true if the next character belongs to one of the specified characters in the group. The characters in the group can be absolute or of type. An absolute character is the one that is immediately comparable, e.g. "abc123", i.e. all characters in the unicode set. Type characters are those belonging to a character type, such as letters, consonants, vowels, numbers, etc.. A type character is specified using the "\" activator 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 consonant
\& - Any vowel
\@ - Any accented vowel
\< - Any lowercase letter
\> - Any capital letter
\_ - Any punctuation
\' - Any apostrophe
\- - Any hyphen
\! - Any character other than letters, numbers and punctuation
\s - Any space
\n - Any null character (for example at the end or beginning of a line)
\\ - The inverted slash
The "Cg" instruction is a more immediate route than using multiple "Cn" and "Cr" instructions.
- Examples:
Text string: a
Braille string: 456
Condition: Cg "xy\#\@"
Description: Returns true if after the index the character is an "x", a "y", a number or an accented vowel. For example, "a" is transcribed with cell "456" if it is followed by the character "x" (ax), by "y" (ay), by any number (a1" or by any accented vowel (aè).
Text string: biblos
Braille string: 12 234
Condition: Cg"\_\s\n"
Description: Returns true if the word "biblos" is followed by any punctuation mark, space or null character, so "biblos" is transcribed with cells "12 234".