is an ordered collection of small non-negative integers that can
represent any 16 bit Unicode character.
Elements in a string can be accessed by numeric index using familiar
subscript or pointer notation:
Uninitialized elements always start at
string *string string[i+j] *(string+i+j)
which is also called the null character.
Yoix strings are not explicitly null terminated.
However, built-ins that work with strings and look like they came from
behave the way you would expect;
they simply assume there is a terminating null character if they get
to the end of a string before finding one.
creates three strings, initializes some of the elements, and then prints
String s2 = "hello, world";
String s3 = "xyzzy";
printf("s1=|%S|\ns2=|%S|\ns3=|%S|\n", s1, s2, s3);
on standard output (where
is used to represent otherwise invisible null characters).
Notice how we used the
format to dump all the elements in each string,
including the null characters.
format would also work, but we could not use
because it stops at the first null character.
| See Also:
Yoix is a registered trademark of AT&T Inc.