TEST2CSTR(5)

Table of Contents

Name

text2Cstr converts arbitrary text to a C string equivalent

Synopsis

STRING text2Cstr(string)
STRING string;

Description

This component of the run-time library is a function that converts a character string into the C string equivalent. When the converted string is output the result will be identical to the input string.

This conversion involves transforming the following characters:

newlines
to \n
carriage returns
to \r
tabs
to \t vertical tabs to \v
backspaces
to \b double quotes to \" single quotes to \' backslashes to \\
form feeds
to \f

An internal buffer is used for the conversion and a pointer to this buffer is returned. If the converted string is to be used after a subsequent call to text2Cstr, then it must be copied (see strsave in STRSAVE(5) ).

Example

text2Cstr applied to abc returns the string abc

text2Cstr applied to ab\»
returns the string ab\\\"

See Also

CAPITALIZE(5)
STRSAVE(5)


© 1990 Lucent Technologies, Inc
© 1998 Harmony Software, Inc