Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdio.h"
- #include "stdlib.h"
- #include "string.h"
- notLatinClear(char str[]){
- int i = 0;
- int n = 0;
- char * str2;
- str2 = malloc(strlen(str) * sizeof(char));
- if (!str2)
- return 1;
- while (str[i] != '\0'){
- str2[i] = 0;
- if ((str[i] >= 'a') && (str[i] <= 'z')){
- str2[n] = str[i];
- n++;
- }
- else{
- if ((str[i] >= 'A') && (str[i] <= 'Z')){
- str2[n] = str[i] + 32;
- n++;
- }
- }
- i++;
- }
- return str2;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement