1stringprep(3) libidn stringprep(3)
2
3
4
6 stringprep - API function
7
9 #include <stringprep.h>
10
11 int stringprep(char * in, size_t maxlen, Stringprep_profile_flags
12 flags, const Stringprep_profile * profile);
13
15 char * in input/ouput array with string to prepare.
16
17 size_t maxlen
18 maximum length of input/output array.
19
20 Stringprep_profile_flags flags
21 a Stringprep_profile_flags value, or 0.
22
23 const Stringprep_profile * profile
24 pointer to Stringprep_profile to use.
25
27 Prepare the input zero terminated UTF-8 string according to the string‐
28 prep profile, and write back the result to the input string.
29
30 Note that you must convert strings entered in the systems locale into
31 UTF-8 before using this function, see stringprep_locale_to_utf8().
32
33 Since the stringprep operation can expand the string, maxlen indicate
34 how large the buffer holding the string is. This function will not
35 read or write to characters outside that size.
36
37 The flags are one of Stringprep_profile_flags values, or 0.
38
39 The profile contain the Stringprep_profile instructions to perform.
40 Your application can define new profiles, possibly re-using the generic
41 stringprep tables that always will be part of the library, or use one
42 of the currently supported profiles.
43
44 Return value: Returns STRINGPREP_OK iff successful, or an error code.
45
47 Report bugs to <help-libidn@gnu.org>.
48 General guidelines for reporting bugs: https://www.gnu.org/gethelp/
49 GNU Libidn home page: https://www.gnu.org/software/libidn/
50
51
53 Copyright © 2002-2022 Simon Josefsson.
54 Copying and distribution of this file, with or without modification,
55 are permitted in any medium without royalty provided the copyright no‐
56 tice and this notice are preserved.
57
59 The full documentation for libidn is maintained as a Texinfo manual.
60 If the info and libidn programs are properly installed at your site,
61 the command
62
63 info libidn
64
65 should give you access to the complete manual. As an alternative you
66 may obtain the manual from:
67
68 https://www.gnu.org/software/libidn/manual/
69
70libidn 1.41 stringprep(3)