begin process at 2012 05 28 08:04:06
  Trouver un code source :
 
dans
 
Accueil > Forum > 

Archive C/C++

 > 

Archives

 > 

Au secours

 > 

cherche aide operations sur chaines


Derniers messages déposésPoser une question dans le forum ou lancer une discussion

cherche aide operations sur chaines

vendredi 2 juillet 2004 à 00:45:26 | cherche aide operations sur chaines

Guidelor


Bonjour,
je cherche un site ou je pourrais trouver de l'aide sur toutes les fonctions pour les operations sur les chaines, specialement pour rechercher une sous chaine ds une chaine...
J'ai un pe cherché sur cppfrance mais y a pas vraiment d'explication sur ladite fonction

dsl pour la non-clarté de ce message mais merci d'avance !

:: Guidelor ::
vendredi 2 juillet 2004 à 00:54:53 | Re : cherche aide operations sur chaines

BruNews

Administrateur CodeS-SourceS
strstr()
ce site se nomme MSDN:
http://www.msdn.microsoft.com/library/default.asp

ciao...
BruNews, Admin CS, MVP Visual C++
vendredi 2 juillet 2004 à 01:45:23 | Re : cherche aide operations sur chaines

vecchio56

Administrateur CodeS-SourceS
B.3 String Functions: <string.h>
There are two groups of string functions defined in the header <string.h>. The first have names beginning with str; the second have names beginning with mem. Except for memmove, the behavior is undefined if copying takes place between overlapping objects. Comparison functions treat arguments as unsigned char arrays.
In the following table, variables s and t are of type char *; cs and ct are of type const char *; n is of type size_t; and c is an int converted to char.

char *strcpy(s,ct) copy string ct to string s, including '\0'; return s.
char *strncpy(s,ct,n) copy at most n characters of string ct to s; return s. Pad with '\0''s if ct has fewer than n characters.
char *strcat(s,ct) concatenate string ct to end of string s; return s.
char *strncat(s,ct,n) concatenate at most n characters of string ct to string s, terminate s with '\0'; return s.
int strcmp(cs,ct) compare string cs to string ct, return <0 if cs<ct, 0 if cs==ct, or >0 if cs>ct.
int strncmp(cs,ct,n) compare at most n characters of string cs to string ct; return <0 if cs<ct, 0 if cs==ct, or >0 if cs>ct.
char *strchr(cs,c) return pointer to first occurrence of c in cs or NULL if not present.
char *strrchr(cs,c) return pointer to last occurrence of c in cs or NULL if not present.
size_t strspn(cs,ct) return length of prefix of cs consisting of characters in ct.
size_t strcspn(cs,ct) return length of prefix of cs consisting of characters not in ct.
char *strpbrk(cs,ct) return pointer to first occurrence in string cs of any character string ct, or NULL if not present.
char *strstr(cs,ct) return pointer to first occurrence of string ct in cs, or NULL if not present.
size_t strlen(cs) return length of cs.
char *strerror(n) return pointer to implementation-defined string corresponding to error n.
char *strtok(s,ct) strtok searches s for tokens delimited by characters from ct; see below.


A sequence of calls of strtok(s,ct) splits s into tokens, each delimited by a character from ct. The first call in a sequence has a non-NULL s, it finds the first token in s consisting of characters not in ct; it terminates that by overwriting the next character of s with '\0' and returns a pointer to the token. Each subsequent call, indicated by a NULL value of s, returns the next such token, searching from just past the end of the previous one. strtok returns NULL when no further token is found. The string ct may be different on each call.

The mem... functions are meant for manipulating objects as character arrays; the intent is an interface to efficient routines. In the following table, s and t are of type void *; cs and ct are of type const void *; n is of type size_t; and c is an int converted to an unsigned char.

void *memcpy(s,ct,n) copy n characters from ct to s, and return s.
void *memmove(s,ct,n) same as memcpy except that it works even if the objects overlap.
int memcmp(cs,ct,n) compare the first n characters of cs with ct; return as with strcmp.
void *memchr(cs,c,n) return pointer to first occurrence of character c in cs, or NULL if not present among the first n characters.
void *memset(s,c,n) place character c into first n characters of s, return s.
vendredi 2 juillet 2004 à 10:49:36 | Re : cherche aide operations sur chaines

Guidelor



Merci vecchio56, j'espere que ce ne t'as pas pris trop de temps à tout taper :):)

aurais-tu le lien ou tu as trouvé tout ca ?


:: Guidelor ::
vendredi 2 juillet 2004 à 11:23:56 | Re : cherche aide operations sur chaines

vecchio56

Administrateur CodeS-SourceS
Je l'ai pas tapé, je l'ai copier/coller, je suis pas fou.
samedi 10 juillet 2004 à 15:05:56 | Re : cherche aide operations sur chaines

Scalpweb

Membre Club
Ca m'a bien aider aussi, merci.
samedi 10 juillet 2004 à 15:08:11 | Re : cherche aide operations sur chaines

vecchio56

Administrateur CodeS-SourceS
http://vecchio56.free.fr/Kernighan%20&%20Ritchie%20-%20The%20C%20Programming%20Language.rar


Cette discussion est classée dans : aide, cherche, chaines, blue, operations


Répondre à ce message

Sujets en rapport avec ce message

AIDE: CHERCHE TUTORIEL SUR LES FONCTIONS GRAPHIQUES [ par Mmuller57 ] je CHERCHE un TUTORIEL sur LES FONCTIONS GRAPHIQUES en C++(tracer une ligne, un cercle, un carrée, un rectangle, un polygone et le tout en C++ !). Je demande d'aide [ par dhaw ] je demande SVP un code source en C sur la simulation d'un réseau de files d'attente, merci!! c'est très urgent!SVP aider moi !! ecriture dans fichiers avec l'aide de structures [ par lucypher ] Je cherche comment faire une fonction permettant d'ecrire, par l'intermediaire d'une structure, dans un fichier. Je cherche egalement (et c'est encore Soustraction de chaines converties en heures... [ par Guidelor ] Bonjour à tous !en fait j'ai 2 chaines : "20:48:12" et "21:11:45" lues à partir d'un fichier texteet j'aurais besoin d'un genie qui arriverait à sous aide pour creation d'un mmorpg [ par elrohir_74 ] Salut tout le monde, je cherche de l'aide car je dois réaliser mon mémoire cette année et je me suis embarq remplacemnt de chaines de caractères [ par borgeomi ] borgeomibonjouuuuuuur !!!!!peut-on utiliser replace_if ou transform pour modiifier dans une chaîne un suite de caractères par une autre ( longueurs di SDL - cherche aide.... [ par WormsParty ] Hello !voilà je débute avec la librairie SDL avec DevC++.Je voulais savoir si quelqu'un pourrait me dire tout ce qui doit être déclaré et utilisé comm string de la STL et comparaison de chaines [ par shenron666 ] Slt, je cherche un moyen de faire une comparaison de 2 chaines déclarées en string et donc en utilisant la stl seulement il n'y a pas de fonction de c je cherche un aide [ par edipe1 ] salut et merci à tout qui travaille en ce site également à tous les membres de ce site je me présente je suis un étudiant en tchnologie des systèmes i Prog VB6 cherche aide Prog C [ par FatJoe ] Bonjour,Mon souci est que je ne "programme" qu'en VB or pour mon boulot j'utilise un logiciel Fabmasterpermettant de charger les CAO électronique des


Nos sponsors


Sondage...

Comparez les prix

CalendriCode

Mai 2012
LMMJVSD
 123456
78910111213
14151617181920
21222324252627
28293031   

Consulter la suite du CalendriCode

Photothèque

A découvrir



 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,811 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales