Scroll to navigation

wcpncpy(3) Library Functions Manual wcpncpy(3)

NOME

wcpncpy - copia uma string de caracteres largos de tamanho fixo, retornando um ponteiro para o seu final

BIBLIOTECA

Biblioteca C Padrão (libc, -lc)

SINOPSE

#include <wchar.h>
wchar_t *wcpncpy(wchar_t dest[restrict .n],
                 const wchar_t src[restrict .n],
                 size_t n);

Requisitos de macro de teste de recursos para o glibc (consulte feature_test_macros(7)):

wcpncpy():


Desde o glibc 2.10:
_POSIX_C_SOURCE >= 200809L
Antes do glibc 2.10:
_GNU_SOURCE

DESCRIÇÃO

The wcpncpy() function is the wide-character equivalent of the stpncpy(3) function. It copies at most n wide characters from the wide-character string pointed to by src, including the terminating null wide (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 L'\0' characters. If the length wcslen(src) is greater than or equal to n, the string pointed to by dest will not be L'\0' terminated.

As strings não podem se sobrepor.

O programador deve assegurar que há espaço para pelo menos n caracteres largos em dest.

VALOR DE RETORNO

wcpncpy() retorna um ponteiro para os últimos caracteres largos escritos, isto é, dest+n-1.

ATRIBUTOS

Para uma explicação dos termos usados nesta seção, consulte attributes(7).

Interface Atributo Valor
wcpncpy() Thread safety MT-Safe

PADRÕES

POSIX.1-2008.

VEJA TAMBÉM

stpncpy(3), wcsncpy(3)

TRADUÇÃO

A tradução para português brasileiro desta página man foi criada por Marcelo D. Beckmann <marcelobeckmann@yahoo.com>, André Luiz Fassone <lonely_wolf@ig.com.br> e Rafael Fontenelle <rafaelff@gnome.org>.

Esta tradução é uma documentação livre; leia a Licença Pública Geral GNU Versão 3 ou posterior para as condições de direitos autorais. Nenhuma responsabilidade é aceita.

Se você encontrar algum erro na tradução desta página de manual, envie um e-mail para a lista de discussão de tradutores.

20 julho 2023 Linux man-pages 6.05.01