wcsdup
Section: C Library Functions (3)
Updated: 2026-02-08
Index
JM Home Page
roff page
名前
wcsdup - ワイド文字文字列を複製する
ライブラリ
標準 C ライブラリ (libc,~-lc)
書式
#include <wchar.h>
wchar_t *wcsdup(const wchar_t *s);
glibc 向けの機能検査マクロの要件 (feature_test_macros(7) 参照):
wcsdup():
Since glibc 2.10:
_POSIX_C_SOURCE >= 200809L
Before glibc 2.10:
_GNU_SOURCE
説明
wcsdup() 関数は、 strdup(3) 関数のワイド文字版である。 この関数はポインター s
が指し示すワイド文字文字列の複製を 新しい領域に割り当てて返す。
新しいワイド文字文字列のためのメモリーは malloc(3) を使って割り当てられる。 この領域は free(3)
を使って解放すべきである。
返り値
On success, wcsdup() returns a pointer to the new wide-character
string. On error, it returns NULL, with errno set to indicate the error.
エラー
- ENOMEM
-
複製文字列を割り当てるのに十分なメモリーがない。
属性
この節で使用されている用語の説明については、 attributes(7) を参照。
| インターフェース | 属性 | 値
|
|
wcsdup()
| Thread safety | MT-Safe
|
標準規格
POSIX.1-2008.
歴史
libc5, glibc 2.0.
関連項目
strdup(3), wcscpy(3)
Index
- 名前
-
- ライブラリ
-
- 書式
-
- 説明
-
- 返り値
-
- エラー
-
- 属性
-
- 標準規格
-
- 歴史
-
- 関連項目
-
This document was created by
man2html,
using the manual pages.