wcsdupのヘルプ・マニュアル
日本語 英語
wcsdup --help
man wcsdup
WCSDUP(3) Linux Programmer’s Manual WCSDUP(3)
名前
wcsdup - ワイド文字文字列を複製する
書式
#define _GNU_SOURCE
#include
wchar_t *wcsdup(const wchar_t *s);
説明
wcsdup() 関数は、 strdup(3) 関数のワイド文字版である。この関数はポイン
タ s が指し示すワイド文字文字列の複製を新しい領域に割り当てて返す。
新しいワイド文字文字列のためのメモリは malloc(3) を使って割り当てられる
。この領域は free(3) を使って解放すべきである。
返り値
wcsdup() 関数は、新しいワイド文字文字列へのポインタを返す。十分なメモリ
がなければ NULL を返す。
エラー
ENOMEM 複製文字列を割り当てるのに十分なメモリがない。
準拠
POSIX.1-2008. この関数は POSIX.1-2001 では規定されていないが 、 Linux
以外の他のシステムで広く利用可能である。
関連項目
strdup(3), wcscpy(3), feature_test_macros(7)
GNU 2009-02-04 WCSDUP(3)
WCSDUP(3) Linux Programmer’s Manual WCSDUP(3)
NAME
wcsdup - duplicate a wide-character string
SYNOPSIS
#define _GNU_SOURCE
#include
wchar_t *wcsdup(const wchar_t *s);
DESCRIPTION
The wcsdup() function is the wide-character equivalent of the strdup(3)
function. It allocates and returns a new wide-character string whose
initial contents is a duplicate of the wide-character string pointed to
by s.
Memory for the new wide-character string is obtained with malloc(3),
and should be freed with free(3).
RETURN VALUE
The wcsdup() function returns a pointer to the new wide-character
string, or NULL if sufficient memory was not available.
ERRORS
ENOMEM Insufficient memory available to allocate duplicate string.
CONFORMING TO
POSIX.1-2008. This function is not specified in POSIX.1-2001, and is
not widely available on other systems.
SEE ALSO
strdup(3), wcscpy(3), feature_test_macros(7)
COLOPHON
This page is part of release 3.22 of the Linux man-pages project. A
description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
GNU 2009-02-04 WCSDUP(3)