blob: 186dd420828341988dad0ac919ccd4d015b6349d [file]
<html lang="en">
<head>
<title>wcslcpy - Untitled</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Untitled">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Wchar-strings.html#Wchar-strings" title="Wchar strings">
<link rel="prev" href="wcslcat.html#wcslcat" title="wcslcat">
<link rel="next" href="wcslen.html#wcslen" title="wcslen">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<a name="wcslcpy"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="wcslen.html#wcslen">wcslen</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="wcslcat.html#wcslcat">wcslcat</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Wchar-strings.html#Wchar-strings">Wchar strings</a>
<hr>
</div>
<h3 class="section">6.15 <code>wcslcpy</code>&mdash;copy a wide-character string to specified length</h3>
<p><strong>Synopsis</strong>
<pre class="example"> #include &lt;wchar.h&gt;
size_t wcslcpy(wchar_t *<var>dst</var>, const wchar_t *<var>src</var>, size_t <var>siz</var>);
</pre>
<p><strong>Description</strong><br>
<code>wcslcpy</code> copies wide characters from <var>src</var> to <var>dst</var>
such that up to <var>siz</var> - 1 characters are copied. A
terminating null is appended to the result, unless <var>siz</var>
is zero.
<p><br>
<strong>Returns</strong><br>
<code>wcslcpy</code> returns the number of wide characters in <var>src</var>,
not including the terminating null wide character. If the
return value is greater than or equal to <var>siz</var>, then
not all wide characters were copied from <var>src</var> and truncation
occurred.
<p><br>
<strong>Portability</strong><br>
No supporting OS subroutines are required.
<p><br>
</body></html>