void normalizeString(char *s) { char *first = s, *last = s; while(*last) { while(esBlanco(*last) && *last) last ++; if(*last) { *first = capitalize(*last); first ++; last ++; } while(!esBlanco(*last) && *last) { *first = lowercase(*last); first ++; last ++; } if(*first) { *first = ' '; first ++; } } if( *(first - 1) == ' ') { first --; *first = '\0'; } }
int seaBlanco(char *s) { while(*s) { if(esBlanco(*s)) return 0; s ++; } return 1; }
char *decodificar(char *cad) { char *aux = cad; char *aux2 = cad; char *aux3; char des; while(esBlanco(*cad)) cad++; str_cpy(aux, cad); des = *aux; while(*aux2) { if(*aux2 == des) { str_cpy(aux2, aux2+1); } aux2++; } aux3 = aux2; aux2--; while(esBlanco(*aux2)) aux2--; str_cpy(aux2+1, aux3); return aux; }