123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208 |
- //go:build windows
- package yu_phone
- import (
- "fmt"
- "strings"
- "testing"
- )
- func TestLanguage(t *testing.T) {
- fmt.Println(GetLanguage("91"))
- fmt.Println(GetLanguage("86"))
- fmt.Println(GetAreas())
- j_ddd := `
- 1 12
- 7 0
- 380 1
- 997 2
- 60 7
- 254 8
- 255 9
- 84 10
- 996 11
- 972 13
- 48 15
- 44 16
- 261 17
- 243 18
- 234 19
- 20 21
- 91 22
- 353 23
- 509 26
- 225 27
- 220 28
- 381 29
- 967 30
- 27 31
- 40 32
- 57 33
- 372 34
- 994 35
- 212 37
- 233 38
- 54 39
- 998 40
- 237 41
- 235 42
- 49 43
- 370 44
- 385 45
- 46 46
- 964 47
- 31 48
- 371 49
- 43 50
- 375 51
- 66 52
- 966 53
- 52 54
- 886 55
- 34 56
- 98 57
- 213 58
- 386 59
- 880 60
- 221 61
- 90 62
- 420 63
- 94 64
- 51 65
- 92 66
- 64 67
- 224 68
- 223 69
- 58 70
- 251 71
- 976 72
- 55 73
- 55 73
- 93 74
- 256 75
- 244 76
- 357 77
- 33 78
- 675 79
- 258 80
- 977 81
- 32 82
- 359 83
- 36 84
- 373 85
- 39 86
- 595 87
- 504 88
- 216 89
- 505 90
- 670 91
- 591 92
- 506 93
- 502 94
- 971 95
- 263 96
- 1787 97
- 249 98
- 228 99
- 965 100
- 503 101
- 218 102
- 1876 103
- 1868 104
- 593 105
- 268 106
- 968 107
- 387 108
- 1809 109
- 963 110
- 974 111
- 507 112
- 53 113
- 222 114
- 232 115
- 962 116
- 351 117
- 1246 118
- 257 119
- 229 120
- 673 121
- 1242 122
- 267 123
- 501 124
- 236 125
- 1809 126
- 1473 127
- 30 129
- 245 130
- 592 131
- 354 132
- 269 133
- 1869 134
- 231 135
- 266 136
- 265 137
- 264 138
- 227 139
- 250 140
- 421 141
- 597 142
- 992 143
- 377 144
- 973 145
- 260 147
- 374 148
- 252 149
- 242 150
- 56 151
- 226 152
- 961 153
- 241 154
- 355 155
- 598 156
- 230 157
- 960 159
- 590 160
- 993 161
- 594 162
- 358 163
- 1758 164
- 352 165
- 1784 166
- 240 167
- 1268 169
- 1345 170
- 382 171
- 45 172
- 41 173
- 47 174
- 61 175
- 291 176
- 211 177
- 239 178
- 297 179
- 1664 180
- 1264 181
- 389 183
- 248 184
- 687 185
- 238 186
- 679 189
- 65 196
- 350 201
- `
- for _, j_item := range strings.Split(j_ddd, "\n") {
- for strings.Index(j_item, " ") > -1 {
- j_item = strings.ReplaceAll(j_item, " ", " ")
- }
- j_item := strings.Split(j_item, " ")
- if len(j_item) != 2 {
- continue
- }
- j_lang := GetLanguage(j_item[0])
- fmt.Println(j_item[0], j_item[1], j_lang.Name)
- }
- }
|