strpbrk

Da cppreference.com.
< c‎ | string‎ | byte

 
 
 
Null-stringhe terminate byte
Funzioni
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Carattere manipolazione
Original:
Character manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Le conversioni in formati numerici
Original:
Conversions to numeric formats
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Della gestione delle stringhe
Original:
String manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
strcpy
strncpy
strcat
strncat
strxfrm
String esame
Original:
String examination
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Memoria manipolazione
Original:
Memory manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
memchr
memcmp
memset
memcpy
memmove
Varie
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
strerror
 
Elemento definito nell'header <string.h>
constchar* strpbrk(constchar* dest, constchar* str );
char*       strpbrk(       char* dest, constchar* str );
Trova il primo carattere nella stringa di byte puntato da dest, che è anche nella stringa di byte puntato da str.
Original:
Finds the first character in byte string pointed to by dest, that is also in byte string pointed to by str.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Indice

[modifica]Parametri

dest -
puntatore alla stringa con terminazione null byte da analizzare
Original:
pointer to the null-terminated byte string to be analyzed
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
str -
puntatore alla stringa con terminazione null byte che contiene i caratteri da cercare
Original:
pointer to the null-terminated byte string that contains the characters to search for
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica]Valore di ritorno

Puntatore al primo carattere dest, che è anche in str, o NULL se nessun personaggio esiste.
Original:
Pointer to the first character in dest, that is also in str, or NULL if no such character exists.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica]Esempio

#include <stdio.h>#include <string.h>   int main(){char* input ="hello world friend of mine";char* space =" ";char* pos = input;int word_counter =0;   do{ pos = strpbrk(pos, space); word_counter++; pos ? pos++: pos;printf("%d\n", word_counter);}while(pos !=NULL);};

Output:

1 2 3 4 5

[modifica]Vedi anche

restituisce la lunghezza massima del segmento iniziale che consiste
dei soli caratteri non trovati in un'altra stringa di byte
Original:
returns the length of the maximum initial segment that consists
of only the characters not found in another byte string
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(funzione)[modifica]
trova la prima occorrenza di un carattere
Original:
finds the first occurrence of a character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(funzione)[modifica]
C++ documentation for strpbrk
close