ViewVC logotype

Contents of /code/trunk/doc/pcre_utf32_to_host_byte_order.3

Parent Directory Parent Directory | Revision Log Revision Log

Revision 1055 - (show annotations)
Tue Oct 16 15:53:30 2012 UTC (7 years, 1 month ago) by chpe
File size: 1489 byte(s)
pcre32: Add 32-bit library

Create libpcre32 that operates on 32-bit characters (UTF-32).

This turned out to be surprisingly simple after the UTF-16 support
was introduced; mostly just extra ifdefs and adjusting and adding
some tests.
1 .TH PCRE_UTF32_TO_HOST_BYTE_ORDER 3 "24 June 2012" "PCRE 8.30"
3 PCRE - Perl-compatible regular expressions
5 .rs
6 .sp
7 .B #include <pcre.h>
8 .PP
9 .SM
10 .B int pcre32_utf32_to_host_byte_order(PCRE_UCHAR32 *\fIoutput\fP,
11 .ti +5n
12 .B PCRE_SPTR32 \fIinput\fP, int \fIlength\fP, int *\fIhost_byte_order\fP,
13 .ti +5n
14 .B int \fIkeep_boms\fP);
15 .
16 .
18 .rs
19 .sp
20 This function, which exists only in the 32-bit library, converts a UTF-32
21 string to the correct order for the current host, taking account of any byte
22 order marks (BOMs) within the string. Its arguments are:
23 .sp
24 \fIoutput\fP pointer to output buffer, may be the same as \fIinput\fP
25 \fIinput\fP pointer to input buffer
26 \fIlength\fP number of 32-bit units in the input, or negative for
27 a zero-terminated string
28 \fIhost_byte_order\fP a NULL value or a non-zero value pointed to means
29 start in host byte order
30 \fIkeep_boms\fP if non-zero, BOMs are copied to the output string
31 .sp
32 The result of the function is the number of 32-bit units placed into the output
33 buffer, including the zero terminator if the string was zero-terminated.
34 .P
35 If \fIhost_byte_order\fP is not NULL, it is set to indicate the byte order that
36 is current at the end of the string.
37 .P
38 There is a complete description of the PCRE native API in the
39 .\" HREF
40 \fBpcreapi\fP
41 .\"
42 page and a description of the POSIX API in the
43 .\" HREF
44 \fBpcreposix\fP
45 .\"
46 page.

  ViewVC Help
Powered by ViewVC 1.1.5