Added proper(string)

This commit is contained in:
Daniel
2014-09-26 14:50:16 +02:00
parent aa734405ce
commit bd58c3b202
2 changed files with 7 additions and 0 deletions
@@ -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