STRPBRK(3) BSD Library Functions Manual STRPBRK(3)NAME
strpbrk -- locate multiple characters in string
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <string.h>
char *
strpbrk(const char *s, const char *charset);
DESCRIPTION
The strpbrk() function locates in the null-terminated string s the first occurrence of any character in the string charset and returns a
pointer to this character. If no characters from charset occur anywhere in s strpbrk() returns NULL.
SEE ALSO memchr(3), strchr(3), strcspn(3), strrchr(3), strsep(3), strspn(3), strstr(3), strtok(3), wcspbrk(3)STANDARDS
The strpbrk() function conforms to ISO/IEC 9899:1990 (``ISO C90'').
BSD June 4, 1993 BSD
Check Out this Related Man Page
STRSPN(3) BSD Library Functions Manual STRSPN(3)NAME
strspn, strcspn -- span a string
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <string.h>
size_t
strspn(const char *s, const char *charset);
size_t
strcspn(const char *s, const char *charset);
DESCRIPTION
The strspn() function spans the initial part of the null-terminated string s as long as the characters from s occur in the null-terminated
string charset. In other words, it computes the string array index of the first character of s which is not in charset, else the index of
the first null character.
The strcspn() function spans the initial part of the null-terminated string s as long as the characters from s do not occur in the null-ter-
minated string charset (it spans the complement of charset). In other words, it computes the string array index of the first character of s
which is also in charset, else the index of the first null character.
RETURN VALUES
The strspn() and strcspn() functions return the number of characters spanned.
SEE ALSO memchr(3), strchr(3), strpbrk(3), strrchr(3), strsep(3), strstr(3), strtok(3), wcsspn(3)STANDARDS
The strspn() and strcspn() functions conform to ISO/IEC 9899:1990 (``ISO C90'').
BSD May 24, 2014 BSD
Hi Friends,
When Iam running c program in redhat linux 7.3 version and PCQ Linux 8.0 version, its taking around 20 seconds. But when Iam running it in HP-UX Release 11i, its taking around 3 minutes. Can anyone throw light on this.
Thanks in advance,
Praveen. (11 Replies)
Hi everybody,
I wrote a small subroutine 'GetStringDelim()' to return a substring from a string enclosed by a string 'Limit1' and a char 'Limit2'. It works perfectly and I don't get an error message together with valgrind, if I set the 3rd parameter in GetStringDelim() to NULL (see below).
... (3 Replies)
Hi,
I am trying to fetch some values from db and spooling the output to a file.
when i query the db for the values, i get the values in following format.
PC_1 wf_test1 Test
PC_2 wf_test2 Test
PC_3 wf_test3 Test
But my spool file was created in following format.
PC_1
wf_test1
Test... (20 Replies)
Hi I have a string like
"12;13;14|aa = 14;bb = 15"
I have to store the values 12,13 and 14 in a list.
and aa,bb in another list.
Can anyone suggest me how to perform this in c++?
:confused:
Use code tags please, see PM. (2 Replies)
I've been having problems lately trying to do pattern matching in C while implementing wildcards. Take for instance the following code:
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <dirent.h>
#include <string.h> ... (14 Replies)