This repository has been archived by the owner on Oct 24, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sintil.de.fn.c
56 lines (51 loc) · 1.62 KB
/
sintil.de.fn.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include <stdio.h>
#include <ctype.h>
void
sintilde(char* palabra)
{
int j = 0, k = 0;
for ( ;palabra[j] != 0 ; j++, k++ )
{
if ( palabra[j] == '\303' )
{
k--;
continue;
}
if ( palabra[j] >= "à"[1] &&
palabra[j] <= "æ"[1] )
palabra[k] = 'a';
else if ( palabra[j] >= "ì"[1] &&
palabra[j] <= "ï"[1] )
palabra[k] = 'i';
else if ( palabra[j] >= "ù"[1] &&
palabra[j] <= "ü"[1] )
palabra[k] = 'u';
else if ( palabra[j] >= "è"[1] &&
palabra[j] <= "ë"[1] )
palabra[k] = 'e';
else if ( palabra[j] >= "ò"[1] &&
palabra[j] <= "ö"[1] )
palabra[k] = 'o';
else if ( palabra[j] >= "À"[1] &&
palabra[j] <= "Ä"[1] )
palabra[k] = 'a';
else if ( palabra[j] >= "Ì"[1] &&
palabra[j] <= "Ï"[1] )
palabra[k] = 'i';
else if ( palabra[j] >= "Ù"[1] &&
palabra[j] <= "Ü"[1] )
palabra[k] = 'u';
else if ( palabra[j] >= "È"[1] &&
palabra[j] <= "Ë"[1] )
palabra[k] = 'e';
else if ( palabra[j] >= "Ò"[1] &&
palabra[j] <= "Ö"[1] )
palabra[k] = 'o';
else if ( palabra[j] == "ñ"[1] )
palabra[k] = 'n';
else if ( palabra[j] == "Ñ"[1] )
palabra[k] = 'n';
else palabra[k] = tolower(palabra[j]);
}
palabra[k] = 0;
}