modified on 6 November 2007 at 00:46 ••• 4,009 views

String Object

From GNUpdf

Jump to: navigation, search

A sequence of bytes (0-255)

Can be written in two ways:

  • Sequence of literal characters ( )
  • Hexadecimal data < >

Literal strings

Content: any character except unbalanced parentheses (( ))

The backslash character (\) must be treated specially:

Backslash sequence Meaning
\n Line Feed (LF)
\r Carriage Return (CR)
\t Horizontal Tab (HT)
\b Backspace (BS)
\f FormFeed (FF)
\( Left parenthesis (maybe unbalanced)
\) Right parenthesis (maybe unbalanced)
\\ Backslash
\EOL Ignore
\ddd (octal) character code ddd. One, two or three 0-7 digits with overflow ignored. If a digit follows, three octals digits are mandatory.
Example sunflower image
Note: any backslash occurence inside a string not found on the above table should be ignored


Example sunflower image
Note: inner balanced parenthesis are taken literally and doesnt make use of backslash scaping


Hexadecimal strings

<[0-9A-Fa-f[WSC]]*>

White-space characters are ignored.

Each pair of hexadecimal digits define a single character.

Example sunflower image
Note: if there is an odd number of digits inside a hexadecimal string the final digit is assumed to be 0