ONC+ Developer's Guide

Strings

The C language has no built-in string type, but instead uses the null-terminated char * convention. In C, strings are usually treated as null- terminated single-dimensional arrays.

In XDR language, strings are declared using the string keyword, and compiled into type char * in the output header file. The maximum size contained in the angle brackets specifies the maximum number of characters allowed in the strings (not counting the NULL character). The maximum size may be omitted, indicating a string of arbitrary length.

Examples:

string name<32>;   --> char *name;
string longname<>; --> char *longname;

Note -

NULL strings cannot be passed; however, a zero-length string (that is, just the terminator or NULL byte) can be passed.