mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 12:35:33 +01:00
Added proper(string)
This commit is contained in:
@@ -160,6 +160,7 @@
|
||||
interpreter.SetProc("reverse", /proc/n_reverse)
|
||||
interpreter.SetProc("tonum", /proc/n_str2num)
|
||||
interpreter.SetProc("replace", /proc/n_replace)
|
||||
interpreter.SetProc("proper", /proc/n_proper)
|
||||
|
||||
// Numbers
|
||||
interpreter.SetProc("tostring", /proc/n_num2str)
|
||||
|
||||
@@ -170,6 +170,12 @@
|
||||
if(istext(string))
|
||||
return text2num(string)
|
||||
|
||||
/proc/n_proper(var/string)
|
||||
if(!istext(string))
|
||||
return ""
|
||||
|
||||
return text("[][]", uppertext(copytext(string, 1, 1)), lowercase(copytext(string, 2)))
|
||||
|
||||
// --- Number methods ---
|
||||
|
||||
//Returns the highest value of the arguments
|
||||
|
||||
Reference in New Issue
Block a user