stringprep_4i.texi   [plain text]


@subheading stringprep_4i
@anchor{stringprep_4i}
@deftypefun {int} {stringprep_4i} (uint32_t * @var{ucs4}, size_t * @var{len}, size_t @var{maxucs4len}, Stringprep_profile_flags @var{flags}, const Stringprep_profile * @var{profile})
@var{ucs4}: input/output array with string to prepare.

@var{len}: on input, length of input array with Unicode code points,
on exit, length of output array with Unicode code points.

@var{maxucs4len}: maximum length of input/output array.

@var{flags}: a @code{Stringprep_profile_flags} value, or 0.

@var{profile}: pointer to @code{Stringprep_profile} to use.

Prepare the input UCS-4 string according to the stringprep profile,
and write back the result to the input string.

The input is not required to be zero terminated (@code{ucs4}[@code{len}] = 0).
The output will not be zero terminated unless @code{ucs4}[@code{len}] = 0.
Instead, see @code{stringprep_4zi()} if your input is zero terminated or
if you want the output to be.

Since the stringprep operation can expand the string, @code{maxucs4len}
indicate how large the buffer holding the string is.  This function
will not read or write to code points outside that size.

The @code{flags} are one of @code{Stringprep_profile_flags} values, or 0.

The @code{profile} contain the @code{Stringprep_profile} instructions to
perform.  Your application can define new profiles, possibly
re-using the generic stringprep tables that always will be part of
the library, or use one of the currently supported profiles.

@strong{Return value:} Returns @code{STRINGPREP_OK} iff successful, or an
@code{Stringprep_rc} error code.
@end deftypefun