Strings
The XDR standard defines a string of n (numbered 0 through n-1) ASCII bytes to be the number n encoded as an unsigned integer and followed by the n bytes of the string.
Byte m of the string always precedes byte m+1, and byte 0 of the string always follows the string length. If n is not a multiple of 4, then the n bytes are followed by enough (0 to 3) residual zero bytes, r, to make the total byte count a multiple of 4.
Counted byte strings are declared as one of the following:
string object<m>;
OR
string object<>;
The constant m denotes an upper bound of the
number of bytes that a string may contain. If m is
not specified, as in the second declaration, it is assumed to be (2**32)
- 1, which is the maximum length. The constant m would
normally be found in a protocol specification. For example, a filing
protocol may state that a file name can be no longer than 255 bytes,
as follows:
string filename<255>;
See the Counted Byte String figure (Figure 1).

Note: Encoding a length n greater than the maximum
described in the protocol specification causes an error.