summaryrefslogtreecommitdiff
path: root/doc/pcre_utf16_to_host_byte_order.3
blob: 1851b619dad46d52ab4b251e47c45359cb3c0138 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
.TH PCRE_UTF16_TO_HOST_BYTE_ORDER 3 "21 January 2012" "PCRE 8.30"
.SH NAME
PCRE - Perl-compatible regular expressions
.SH SYNOPSIS
.rs
.sp
.B #include <pcre.h>
.PP
.nf
.B int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *\fIoutput\fP,
.B "     PCRE_SPTR16 \fIinput\fP, int \fIlength\fP, int *\fIhost_byte_order\fP,"
.B "     int \fIkeep_boms\fP);"
.fi
.
.
.SH DESCRIPTION
.rs
.sp
This function, which exists only in the 16-bit library, converts a UTF-16
string to the correct order for the current host, taking account of any byte
order marks (BOMs) within the string. Its arguments are:
.sp
  \fIoutput\fP           pointer to output buffer, may be the same as \fIinput\fP
  \fIinput\fP            pointer to input buffer
  \fIlength\fP           number of 16-bit units in the input, or negative for
                     a zero-terminated string
  \fIhost_byte_order\fP  a NULL value or a non-zero value pointed to means
                     start in host byte order
  \fIkeep_boms\fP        if non-zero, BOMs are copied to the output string
.sp
The result of the function is the number of 16-bit units placed into the output
buffer, including the zero terminator if the string was zero-terminated.
.P
If \fIhost_byte_order\fP is not NULL, it is set to indicate the byte order that
is current at the end of the string.
.P
There is a complete description of the PCRE native API in the
.\" HREF
\fBpcreapi\fP
.\"
page and a description of the POSIX API in the
.\" HREF
\fBpcreposix\fP
.\"
page.