TextHandling

by Deadron
Various text-related functions you might find useful, including reading files into lists and replacing words in strings.
Version 5 · Date Added: 7/13/01

If you wish to download this library for your Linux/Mac installation, enter the following on your command line:

DreamDownload byond://Deadron.TextHandling##version=5

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:

byond://Deadron.TextHandling##version=5

[BYOND Favorite]BYOND Favorite

Read about this library at Dream Makers.

Text-related functions you might find useful. The library contains full documentation and examples. If you are looking to sort text, check out my List library.

dd_file2list(file_path, separator = "\n")
dd_replacetext(text, search_string, replacement_string)
dd_replaceText(text, search_string, replacement_string)
dd_hasprefix(text, prefix)
dd_hasPrefix(text, prefix)
dd_hassuffix(text, suffix)
dd_hasSuffix(text, suffix)
dd_text2list(text, separator)
dd_text2List(text, separator)
dd_list2text(list/the_list, separator)
dd_centertext(message, length)
dd_limittext(message, length)