wcsstr(3) Library Functions Manual wcsstr(3)NAME
wcsstr - Finds a wide-character substring
LIBRARY
Standard C Library (libc)
SYNOPSIS
#include <wchar.h>
wchar_t *wcsstr( const wchar_t *s1, const wchar_t *s2);
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
wcsstr(): XSH5.0
Refer to the standards(5) reference page for more information about industry standards and associated tags.
PARAMETERS
Specifies the wide-character string being searched. Specifies the wide-character substring to be located.
DESCRIPTION
The wcsstr() function locates the first occurrence in the wide-character string pointed to by the s1 parameter of the sequence of wide
characters in the wide-character string pointed to by the s2 parameter, excluding the terminating null wide character.
RETURN VALUES
Upon successful completion, the wcsstr() function returns a pointer to the located wide-character substring or a null pointer when the sub-
string is not found. If the s2 parameter points to a wide-character substring having 0 (zero) length, the wcsstr() function returns the
entire wide-character string pointed to by parameter s1.
[Tru64 UNIX] On error, the function returns a null pointer.
RELATED INFORMATION
Functions: strstr(3), wcswcs(3)
Standards: standards(5) delim off
wcsstr(3)
Check Out this Related Man Page
wcswcs(3) Library Functions Manual wcswcs(3)NAME
wcswcs - Searches for a substring in a wide-character string.
LIBRARY
Standard C Library (libc)
SYNOPSIS
#include <wchar.h>
wchar_t *wcswcs( const wchar_t *wcstring1, const wchar_t *wcstring2);
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
wcswcs(): XSH5.0
The wcswcs() function, although included in Issue 4 and later versions of the XSH specification, is not included in the ISO C standard.
Application developers are strongly encouraged to use wcsstr(), which is included in both XSH Issue 5 and the ISO C standard.
Refer to the standards(5) reference page for more information about industry standards and associated tags.
PARAMETERS
Points to the wide-character string being searched. Points to the wide-character string to be located.
DESCRIPTION
The wcswcs() function locates the first occurrence of a wide-character string in another wide-character string. The function locates the
first occurrence in the string pointed to by the wcstring1 parameter of the sequence of wchar_t characters (excluding the terminating null
wide character) in the string pointed to by the wcstring2 parameter.
RETURN VALUES
The wcswcs() function returns a pointer to the located wide-character string or a null pointer if the wide-character string is not found.
If the wcstring2 parameter points to a wide-character string with zero length, the function returns the wcstring1 parameter.
RELATED INFORMATION
Functions: strstr(3), wcschr(3), wcspbrk(3), wcsstr(3)
Standards: standards(5) delim off
wcswcs(3)
hii,
i want to know the shell command for finding the last occurance of a substring in string..
i can use grep command or sed to find out the occurance of a substring in a string but how do i find out the last occurance.shud i use grep amd and cut the string everytime and store it in a new... (7 Replies)
I have two files:
One is a list of numbers:
1
5
6
7
10
The second is a very long string
abcdefghijklmno......1234567890
I'd like to print a new file with a 5 character substring that starts at each the positions listed in the 1st file:
such as:
abcde (4 Replies)
Hi All,
I'm writing a script where one of the parameter is a string like:
0011001100
Then I want to do a while loop, according to the value of each character.
Could tell how I can access the value of each character in the string?
Thank you,
Gino (6 Replies)
I retrieved values from postgresql database
return the following line
name ------------ myname (1 row)
how can I extract "myname" out of the line?
thanks (11 Replies)
I need to check the occurrence of one string within another.
code
********************
if ;then do something done
********************
Thanks (7 Replies)
Hi,
I am trying to separate the directory from the filename using the substring and it does not like it.
$Complete_name="C:\ABCD\Reports_Split\090308.1630"
I want $File_Name as 090308.1630
I tried using Substring function and it does not like slashes in the complete_name.
Any... (5 Replies)
Hi all.
I need help with a command to locate a substring from a string.
My problem is I am passing a direcotry name as a command line argument and I need to ensure that user should not pass certain directories.
E.g ther are Directories under ==> /opt/projects/* which should not be passed... (3 Replies)
Hey, geniuses of the world (no--facetious is NOT the word of the day;))!
I was wondering if there's a way to extract a specific portion from a string of characters in UNIX/LINUX. Give me the generic capabilities (assuming they exist) and I'll figure out the small details.
But if you know... (8 Replies)
Hello,
I need to remove a substring from a string in a ksh script, the string is like this:
LOCATION=+DATADG1/CMSPRD1/datafile/system.235.456721
or
LOCATION=/u03/oradata/CMSPRD/SYSTEM.dbf
I need to strip the last file name from that path, and get:
+DATADG1/CMSPRD1/datafile
or,... (8 Replies)
Hi i am passingsome parameter while running the script. so ineed to take the last character of thse parameters. i know we can take value of parametr using $
But i need last character and last but one character to store in seperate variables.
This is because, i need to find out the records ... (9 Replies)
I am new to awk and writing a script using awk. I have file containing fixed length records, I wish to extract 2 substring(each substring is padded with zeros on left e.g 000000003623) and add each substring respectively for every record in the file to get total sum of respective substring for all... (5 Replies)
Hi,
My requirement is to get the substring and then remove special character.
Ex
I have data like T_SYSTEM_XXXXX_YYYY_ZZZ
I want to get XXXXXYYYYZZZ
the part after T_SYSTEM is varying it might be XXX_YY or just XX
can you tell me which all commands i have to use.
i understand i... (5 Replies)
Hi All,
I'm facing issue wherein I have 2 character string like 'CR' and 'DR' and I want to extract just 1st character but am unable to do it. I tried below options but they are returning me 2nd character only,
var="CR"
echo ${var:1}
returns just "R"
echo ${var:0}
returns "CR"
... (5 Replies)