Implements a temporary object which is appended to instances of type AString.
Escapes non-printable characters in the given region, or reversely converts such escaped characters to their ASCII values.
The characters converted are '\\'
, '\r'
, '\n'
, '\t'
, '\a'
, '\b'
, '\v'
, '\f'
, '\e'
and '"'
.
If the new region length is needed to be known, it can be calculated as the sum of the old region length and the difference of the string's length before and after the operation.
Definition at line 227 of file format.inl.
Public Field Index: | |
integer | length |
The length of the region to convert. | |
lang::Switch | pSwitch |
integer | startIdx |
The start of the region to convert. | |
Public Method Index: | |
Escape (lang::Switch escape=lang::Switch::On, integer regionStart=0, integer regionLength=MAX_LEN) | |
integer length |
The length of the region to convert.
Definition at line 238 of file format.inl.
lang::Switch pSwitch |
The direction of conversion: Switch::On escapes ascii characters, while Switch::Off converts escaped strings to ascii codes.
Definition at line 232 of file format.inl.
integer startIdx |
The start of the region to convert.
Definition at line 235 of file format.inl.
|
inline |
Constructor. Copies the parameters.
escape | Switch::On escapes ascii characters (the default), Switch::Off converts escaped strings to ascii codes. |
regionStart | The start of the region to convert. |
regionLength | The length of the region to convert. |
Definition at line 247 of file format.inl.