AT&T Home | AT&T Labs | Research
AT&T Labs, Inc. - Research

The Yoix® Scripting Language

Home | What's New | Grammar | Documentation | Download | License | YChart | YDAT | YWAIT | Byzgraf | FAQs
cstring (String str) yoix.string
 
Translates any backspaces, form-feeds, newlines, carriage returns, tabs, backslashes, double quotes and what are commonly called non-printable characters in the us-ascii character set that are found in str into their C-style backslashed escape sequences. Consequently, the result, when enclosed in double quotes and passed through a parser, like the Yoix interpreter or a C complier, would reproduce the original string. In other words, cstring is primarily designed for Yoix programs that create other programs.
 
 Example:   The program,
import yoix.string.*;

String str = "First line:\n\tsecond line.";

stdout.nextline = str;
stdout.nextline = cstring(str);
prints
First line:
        second line.
First line:\n\tsecond line.
on standard output.
 
 Return:   String

 

Yoix is a registered trademark of AT&T Inc.