Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Prescurtat(char s[])
- {
- char t[150],copie[108]={NULL};
- char *p,*z;
- p=strtok(s," ");
- while(p)
- {
- int o=strlen(p)-1;
- if(p[o]=='.')
- {
- strcpy(t, p + o + 1);
- strcpy(p + o, t);
- if(strstr("COLEGIUL",p)!=NULL)
- {
- strcat(copie,"COLEGIUL ");
- }
- else if(strstr("LICEUL",p)!=NULL)
- {
- strcat(copie,"LICEUL ");
- }
- else if(strstr("NATIONAL",p)!=NULL)
- {
- strcat(copie,"NATIONAL ");
- }
- else if(strstr("TEORETIC",p)!=NULL)
- {
- strcat(copie,"TEORETIC ");
- }
- }
- else
- {
- strcat(copie,p);
- strcat(copie," ");
- }
- p=strtok(NULL," ");
- }
- strcpy(s,copie);
- strcpy(t, s + strlen(s));
- strcpy(s + strlen(s)-1, t);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement