Replace text2list and list2text

This commit is contained in:
Tigercat2000
2016-02-28 12:07:19 -08:00
parent 18779eef4d
commit 976887b2e0
56 changed files with 144 additions and 287 deletions
@@ -180,16 +180,15 @@
interpreter.SetProc("shuffle", /proc/shuffle)
interpreter.SetProc("uniquevector", /proc/uniquelist)
interpreter.SetProc("text2vector", /proc/text2list)
interpreter.SetProc("text2vectorEx",/proc/text2listEx)
interpreter.SetProc("vector2text", /proc/list2text)
interpreter.SetProc("text2vector", /proc/n_splittext)
interpreter.SetProc("vector2text", /proc/n_jointext)
// Donkie~
// Strings
interpreter.SetProc("lower", /proc/n_lower)
interpreter.SetProc("upper", /proc/n_upper)
interpreter.SetProc("explode", /proc/string_explode)
interpreter.SetProc("implode", /proc/list2text)
interpreter.SetProc("implode", /proc/n_jointext)
interpreter.SetProc("repeat", /proc/n_repeat)
interpreter.SetProc("reverse", /proc/reverse_text)
interpreter.SetProc("tonum", /proc/n_str2num)
@@ -167,12 +167,12 @@
proc/string_explode(var/string, var/separator = "")
//writepanic("[__FILE__].[__LINE__] \\/proc/string_explode() called tick#: [world.time]")
if(istext(string) && (istext(separator) || isnull(separator)))
return text2list(string, separator)
return splittext(string, separator)
//Converts a list to a string
/proc/list_implode(var/list/li, var/separator)
if(istype(li) && (istext(separator) || isnull(separator)))
return list2text(li, separator)
return jointext(li, separator)
proc/n_repeat(var/string, var/amount)
//writepanic("[__FILE__].[__LINE__] \\/proc/n_repeat() called tick#: [world.time]")
@@ -266,4 +266,10 @@ proc/n_round(var/num)
return replacetext(text, r, with)
/proc/n_replacetextEx(text, r, with)
return replacetextEx(text, r, with)
return replacetextEx(text, r, with)
/proc/n_jointext(list, glue)
return jointext(list, glue)
/proc/n_splittext(text, delim)
return splittext(text, delim)