@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

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

@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 zero terminated UCS-4 string according to the
stringprep profile, and write back the result to the input string.

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

@subheading stringprep
@anchor{stringprep}
@deftypefun {int} {stringprep} (char * @var{in}, size_t @var{maxlen}, Stringprep_profile_flags @var{flags}, const Stringprep_profile * @var{profile})
@var{in}: input/ouput array with string to prepare.

@var{maxlen}: 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 zero terminated UTF-8 string according to the
stringprep profile, and write back the result to the input string.

Note that you must convert strings entered in the systems locale
into UTF-8 before using this function, see
@code{stringprep_locale_to_utf8()}.

Since the stringprep operation can expand the string, @code{maxlen}
indicate how large the buffer holding the string is.  This function
will not read or write to characters 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 error code.
@end deftypefun

@subheading stringprep_profile
@anchor{stringprep_profile}
@deftypefun {int} {stringprep_profile} (const char * @var{in}, char ** @var{out}, const char * @var{profile}, Stringprep_profile_flags @var{flags})
@var{in}: input array with UTF-8 string to prepare.

@var{out}: output variable with pointer to newly allocate string.

@var{profile}: name of stringprep profile to use.

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

Prepare the input zero terminated UTF-8 string according to the
stringprep profile, and return the result in a newly allocated
variable.

Note that you must convert strings entered in the systems locale
into UTF-8 before using this function, see
@code{stringprep_locale_to_utf8()}.

The output @code{out} variable must be deallocated by the caller.

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

The @code{profile} specifies the name of the stringprep profile to use.
It must be one of the internally supported stringprep profiles.

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

