-
Notifications
You must be signed in to change notification settings - Fork 1
/
uwu.v
52 lines (45 loc) · 843 Bytes
/
uwu.v
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
module main
import rand
const eyes = [['>', '<'], ['Q', 'Q'], ['U', 'U'], ['O', 'O'],
['^', '^'],
]
const mouths = ['w', 'W', '_', '.']
const vowels = ['a', 'e', 'i', 'o', 'u']
fn uwu(raw_content string) string {
// v fmt!!!
mut uwu := raw_content.replace_each([
'r',
'w', //
'l',
'w', //
'R',
'W', //
'Th',
'D', //
'th',
'd', //
'v',
'ff', //
'V',
'Ff', //
'Ove',
'uv', //
'ove',
'Uv', //
])
// replace '!' with a random face
for uwu.contains('!') {
uwu = uwu.replace_once('!', face())
}
// Na -> Nya (all vowels)
for vowel in vowels {
uwu = uwu.replace('N' + vowel, 'Ny' + vowel)
uwu = uwu.replace('n' + vowel, 'ny' + vowel)
}
return uwu
}
fn face() string {
eye := eyes[rand.int31() % eyes.len]
mouth := mouths[rand.int31() % mouths.len]
return ' ' + eye[0] + mouth + eye[1]
}