/tg/ Station 13 - Modules - Types

code/__HELPERS/text.dm

/proc/sanitize_name returns nothing with an alert instead of the message if it contains something in the ic filter, and sanitizes normally if the name is fine. It returns nothing so it backs out of the input the same way as if you had entered nothing.
/proc/htmlrendertext Perform a whitespace cleanup on the text, similar to what HTML renderers do
/proc/stripped_input Used to get a properly sanitized input, of max_length no_trim is self explanatory but it prevents the input from being trimed if you intend to parse newlines or whitespace.
/proc/reject_bad_name Filters out undesirable characters from names.
/proc/truncate Truncate a string to the given length
/proc/siunit Formats a number to human readable form with the appropriate SI unit.
/proc/siunit_pressure
/proc/scramble_message_replace_chars Slightly expensive proc to scramble a message using equal probabilities of character replacement from a list. DOES NOT SUPPORT HTML!