WCSDUP(3) Linux Programmer's Manual WCSDUP(3)NAME
wcsdup - duplicate a wide-character string
SYNOPSIS
#define _GNU_SOURCE
#include <wchar.h>
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.25 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)
Check Out this Related Man Page
WCSDUP(3) Linux Programmer's Manual WCSDUP(3)NAME
wcsdup - duplicate a wide-character string
SYNOPSIS
#include <wchar.h>
wchar_t *wcsdup(const wchar_t *s);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
wcsdup():
Since glibc 2.10:
_POSIX_C_SOURCE >= 200809L
Before glibc 2.10:
_GNU_SOURCE
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
On success, wcsdup() returns a pointer to the new wide-character string. On error, it returns NULL, with errno set to indicate the cause
of the error.
ERRORS
ENOMEM Insufficient memory available to allocate duplicate string.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
+----------+---------------+---------+
|Interface | Attribute | Value |
+----------+---------------+---------+
|wcsdup() | Thread safety | MT-Safe |
+----------+---------------+---------+
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)COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the
latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
GNU 2017-09-15 WCSDUP(3)
In Windows,
wchar_t *pStr = L"Hello";
works, but I can't find the equivalent to Unix system.
How can I make static stack-memory-based wide character string in C in Unix? (1 Reply)
Hi all new here.
Question.
My mail server is sending out duplicate emails but its not system wide. We have several virtual host that use our email server and some are having the duplicate emails issue and some are not. For example in the office some people are getting duplicate emails but i am... (1 Reply)
Hi
I have been struggling with a script for removing duplicate messages from a shared mailbox.
I would like to search for duplicate messages based on the “Message-ID” string within the messages files.
I have managed to find the duplicate “Message-ID” strings and (if I would like) delete... (1 Reply)
hi
if i have arry with lots of intergers , how to check if there is duplicate integers
in perl ?
say I ahve @intergers=( 1,2,3,3,4,5,4,99,99,100) (2 Replies)
Hi,
How to eliminate the duplicate values in unix? I have a excel file which contains duplicate values.
Need to use this in a script.
Thanks in advance. (3 Replies)
Hi,
I have a file that looks like this:
a_X data
a_Y data
b data
c data
d_X data
d_Y data
I **want** to duplicate the lines without the _X and _Ys. In other words, I want it to look like this
a_X data
a_Y data
b data
b data
c data
c data
d_X data
d_Y data (13 Replies)
Hey guys, I'm working on a project where we have to duplicate the 'dc' command. I'm having trouble figuring out how to queue the different commands available (such as printing stack contents or saving/executing macros and registers). I'm also having a great deal of trouble finding any literature... (1 Reply)
hi,
Please help me to write a command to delete duplicate lines from a file. And the size of file is 50 MB. How to remove duplicate lins from such a big file. (6 Replies)
Hi,
In a file, I have to mark duplicate records as 'D' and the latest record alone as 'C'.
In the below file, I have to identify if duplicate records are there or not based on Man_ID, Man_DT, Ship_ID and I have to mark the record with latest Ship_DT as "C" and other as "D" (I have to create... (7 Replies)
Dear All,
I have file with 4 columns:
1 AA 0 21
2 BB 0 31
3 AA 0 21
4 CC 0 41
I would like to find the duplicate record based on column 2 and replace the 4th column of the duplicate by a new value. So, the output will be:
1 AA 0 21
2 BB 0 31
3 AA 0 -21
4 CC 0 41
Any suggestions... (3 Replies)
I have following statement and I want to find duplicate word using sed command. How is it possible?
"detect string and remove the duplicate string"
There could be many statements in a file and each line may have duplicate word.
Thanks! (1 Reply)
Hi Gents,
Please can you help me to get the desired output .
In the first column I have some duplicate records, The condition is that all need to reject the duplicate record keeping the last occurrence. But the condition is. If the last occurrence is equal to value 14 or 98 in column 3 and... (2 Replies)