code/_helpers/text.dm

/proc/generate_padding | Builds a string of padding repeated until its character count meets or exceeds size |
---|---|
/proc/pad_left | Pads the matter of padding onto the start of text until the result length is size |
/proc/pad_right | Pads the matter of padding onto the start of text until the result length is size |
strip_improper | Strip out the special beyond characters for \proper and \improper from text that will be sent to the browser. |
/proc/join_url | Connects either a list or variadic arguments with "/" and cleans up multiple joins. eg: join_url("a", "b", "c") => "a/b/c" join_url(list("a", "b", "c")) => "a/b/c" join_url("https://some.tld/", "/cats", "~", "//dogs") => "https://some.tld/cats/~/dogs" |
/proc/get_compass_direction_string | Returns direction-string, rounded to multiples of 22.5, from the first parameter to the second N, NNE, NE, ENE, E, ESE, SE, SSE, S, SSW, SW, WSW, W, WNW, NW, NNW |
Define Details
strip_improper
Strip out the special beyond characters for \proper and \improper from text that will be sent to the browser.