File tree Expand file tree Collapse file tree 5 files changed +1951
-1864
lines changed Expand file tree Collapse file tree 5 files changed +1951
-1864
lines changed Original file line number Diff line number Diff line change @@ -102,3 +102,28 @@ function uarnamala(string) {
102
102
103
103
return result ;
104
104
}
105
+
106
+ function tugjan ( string ) {
107
+ let result = '' ;
108
+ for ( let i = 0 ; i < string . length ; i ++ ) {
109
+ let letter = string [ i ] ;
110
+
111
+ if ( 'A' <= letter && letter <= "Z" ) {
112
+ result += String . fromCharCode ( letter . charCodeAt ( 0 ) + 0xe0c0 - 0x40 ) ;
113
+ } else if ( 'a' <= letter && letter <= "z" ) {
114
+ result += String . fromCharCode ( letter . charCodeAt ( 0 ) + 0xe0e0 - 0x60 ) ;
115
+ } else if ( '0' <= letter && letter <= '4' ) {
116
+ result += String . fromCharCode ( letter . charCodeAt ( 0 ) + 0xe0db - 0x30 ) ;
117
+ } else if ( '5' <= letter && letter <= '9' ) {
118
+ result += String . fromCharCode ( letter . charCodeAt ( 0 ) + 0xe0fb - 0x35 ) ;
119
+ } else if ( letter === '.' ) {
120
+ result += String . fromCharCode ( 0xe0c0 ) ;
121
+ } else if ( letter === ',' ) {
122
+ result += String . fromCharCode ( 0xe0e0 ) ;
123
+ } else {
124
+ result += letter ;
125
+ }
126
+ }
127
+
128
+ return result ;
129
+ }
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ <h1><strong>Sapota</strong> Converter</h1>
19
19
< option value ="Rusimez "> Rusimez</ option >
20
20
< option value ="Erang "> Erang</ option >
21
21
< option value ="Uarnamala "> Uarnamala</ option >
22
+ < option value ="Tugjan "> Tugjan</ option >
22
23
</ select >
23
24
</ p >
24
25
< p >
Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ function keyup() {
46
46
textarea . value = erang ( textarea . value ) ;
47
47
} else if ( languageSelect . value === 'Uarnamala' ) {
48
48
textarea . value = uarnamala ( textarea . value ) ;
49
+ } else if ( languageSelect . value === 'Tugjan' ) {
50
+ textarea . value = tugjan ( textarea . value ) ;
49
51
}
50
52
}
51
53
You can’t perform that action at this time.
0 commit comments