(C) 1998 AROS - The Amiga Research OS


NAME

ULONG EscapeString (String , , , )

LOCATION
In ArpBase at offset 44

SYNOPSIS
STRPTR String
NewLength = EscapeString( "String"
D0 A0

FUNCTION
This function scans the string, replacing all escaped characters with the correct byte value. This function uses the value for ESCAPE set in ESCChar in ArpBase, which is maintained elsewhere; this value defaults to the BCPL '*' (RSN), or may be the normal '\'. This function currently recognizes the following special characters: N - newline T - horizontal tab V - vertical tab B - backspace R - return F - formfeed E - escape (ascii 27 decimal) Xnn - character representd by hex value nn. The above may be either upper or lower case. If this function finds an escaped character which is not one of the above, it will return the character value (i.e. '\A' will be replaced by the single character 'A'. The sequence '\\' is replaced by the single character '\', and so on.) For sending hexcodes, the \x argument may be followed by either one or two hex digits, in either upper or lower case.

INPUTS
string
pointer to a null terminated ASCII string.
RESULT
A new string, starting at the same memory location, but with the escaped characters (if any) changed to their actual byte values. This string will be null terminated. NewCount -- The new length of the string. ADDITIONAL NOTES: For easy use in assembly language parsers, this function will return with the A0 register unchanged.

EXAMPLE
SEE ALSO
GADS

NOTES

BUGS
Routine uses the region of memory pointed to by A0 as a work area, so if you wish to retain a pristine copy of the string, copy it first.

INTERNALS

HISTORY
20.10.1998 hkiel
Amiga Research OS
28.03.1998 bergers
Some new functions.