man-pages/man3/pcre_utf16_to_host_byte_order.3.html
2021-03-31 01:06:50 +01:00

78 lines
2.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of PCRE_UTF16_TO_HOST_BYTE_ORDER</TITLE>
</HEAD><BODY>
<H1>PCRE_UTF16_TO_HOST_BYTE_ORDER</H1>
Section: C Library Functions (3)<BR>Updated: 21 January 2012<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
PCRE - Perl-compatible regular expressions
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<P>
<B>#include &lt;<A HREF="file:///usr/include/pcre.h">pcre.h</A>&gt;</B>
<P>
<PRE>
<B>int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *</B><I>output</I>,
<B> PCRE_SPTR16 </B><I>input</I>, int <I>length</I>, int *<I>host_byte_order</I>,
<B> int </B><I>keep_boms</I>);
</PRE>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
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:
<P>
<BR>&nbsp;&nbsp;<I>output</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pointer&nbsp;to&nbsp;output&nbsp;buffer,&nbsp;may&nbsp;be&nbsp;the&nbsp;same&nbsp;as&nbsp;<I>input</I>
<BR>&nbsp;&nbsp;<I>input</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pointer&nbsp;to&nbsp;input&nbsp;buffer
<BR>&nbsp;&nbsp;<I>length</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;number&nbsp;of&nbsp;16-bit&nbsp;units&nbsp;in&nbsp;the&nbsp;input,&nbsp;or&nbsp;negative&nbsp;for
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;zero-terminated&nbsp;string
<BR>&nbsp;&nbsp;<I>host_byte_order</I>&nbsp;&nbsp;a&nbsp;NULL&nbsp;value&nbsp;or&nbsp;a&nbsp;non-zero&nbsp;value&nbsp;pointed&nbsp;to&nbsp;means
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;start&nbsp;in&nbsp;host&nbsp;byte&nbsp;order
<BR>&nbsp;&nbsp;<I>keep_boms</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;non-zero,&nbsp;BOMs&nbsp;are&nbsp;copied&nbsp;to&nbsp;the&nbsp;output&nbsp;string
<P>
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 <I>host_byte_order</I> 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
<B>pcreapi</B>
page and a description of the POSIX API in the
<B>pcreposix</B>
page.
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
<DT id="2"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="3"><A HREF="#lbAD">DESCRIPTION</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:52 GMT, March 31, 2021
</BODY>
</HTML>