wcsncpy

Section: C Library Functions (3)
Updated: 2026-02-08
Index JM Home Page roff page
 

名前

wcsncpy - 固定長のワイド文字文字列をコピーする  

ライブラリ

標準 C ライブラリ (libc,~-lc)  

書式

#include <wchar.h>

wchar_t *wcsncpy(size_t n;
                 wchar_t dest[restrict n],
                 const wchar_t *restrict src,
                 size_t n);
 

説明

The wcsncpy() function is the wide-character equivalent of the strncpy(3) function. It copies at most n wide characters from the wide-character string pointed to by src, including the terminating null wide character (L'\0'), to the array pointed to by dest. Exactly n wide characters are written at dest. If the length wcslen(src) is smaller than n, the remaining wide characters in the array pointed to by dest are filled with null wide characters. If the length wcslen(src) is greater than or equal to n, the string pointed to by dest will not be terminated by a null wide character.

これらの文字列は重なっていてはならない。

プログラマは、少なくとも n 個のワイド文字が入る領域を dest に確保しなければならない。  

返り値

wcsncpy() は dest を返す。  

属性

この節で使用されている用語の説明については、 attributes(7) を参照。
インターフェース属性値
wcsncpy() Thread safetyMT-Safe
 

標準規格

C11, POSIX.1-2008.  

歴史

POSIX.1-2001, C99.  

関連項目

strncpy(3)


 

Index

名前
ライブラリ
書式
説明
返り値
属性
標準規格
歴史
関連項目

This document was created by man2html, using the manual pages.