mirror of
https://github.com/goonstation/goonstation-2020.git
synced 2026-07-10 22:52:21 +01:00
21 lines
488 B
Plaintext
21 lines
488 B
Plaintext
/proc/trim_left(text)
|
|
for (var/i = 1 to length(text))
|
|
if (text2ascii(text, i) > 32)
|
|
return copytext(text, i)
|
|
return ""
|
|
|
|
/proc/trim_right(text)
|
|
for (var/i = length(text), i > 0, i--)
|
|
if (text2ascii(text, i) > 32)
|
|
return copytext(text, 1, i + 1)
|
|
|
|
return ""
|
|
|
|
/proc/trim(text)
|
|
return trim_left(trim_right(text))
|
|
|
|
/proc/capitalize(var/t as text)
|
|
return uppertext(copytext(t, 1, 2)) + copytext(t, 2)
|
|
|
|
/proc/isVowel(var/t as text)
|
|
return findtextEx(lowertext(t), "aeiouåäö") > 0 |