Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Prescurtat(char s[])
- { char con[100]="",*p;
- p=strtok(s," ");
- while(p)
- {
- unsigned int lp=strlen(p);
- if(p[lp-1]=='.')
- { if(p[0]=='C')
- strcat(con,"COLEGIUL ");
- else
- if(p[0]=='L')
- strcat(con,"LICEUL ");
- else
- if(p[0]=='N')
- strcat(con,"NATIONAL ");
- else
- if(p[0]=='T')
- strcat(con,"TEORETIC ");
- }
- else
- {
- strcat(con,p);
- strcat(con," ");
- }
- p=strtok(NULL," ");
- }
- while(con[strlen(con)-1]==' ')
- con[strlen(con)-1]='\0';
- strcpy(s,con);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement