TextLib

by Hiead
A package of text-manipulation functions. [More]
To download this library for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://Hiead.TextLib##version=1

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

byond://Hiead.TextLib##version=1

584 downloads
Version 1.1
Date added: Jul 1 2008
Last updated: Sep 23 2008
0 fans
This package contains a set of utility functions for manipulating text, which perform commonly-needed operations that people would normally have to implement themselves.

    -   In cases where there is a "text" form and a
        "Text" form, the behavior is case-insensitive
        for the "text" form.

findtext_first_of(haystack, needle, pos=1)

    -   Returns position of the first character from needle
        found in haystack, starting from pos.

findText_first_of(haystack, needle, pos=1)

findtext_first_not_of(haystack, needle, pos=1)

    -   Returns position of the first character from haystack
        not found in needle, starting from pos.
        
findText_first_not_of(haystack, needle, pos=1)

findtext_last_of(haystack, needle, pos=0)

    -   Returns position of the last occurrence of a character
        from needle in hastack, starting from pos (0 = end).
        
findText_last_of(haystack, needle, pos=0)

findtext_last_not_of(haystack, needle, pos=0)

    -   Returns position of the last character from haystack
        not found in needle, starting from pos (0 = end).

findText_last_not_of(haystack, needle, pos=0)

replacetext(haystack, needle, replace)

    -   Replace occurrences of needle in haystack with replace.

replaceText(haystack, needle, replace)

reversetext(text)

    -   Reverses string order.

explodetext(text, delim, limit=0)

    -   Returns a list of strings, each of which is a substring
        of text formed by splitting it on boundaries formed by
        delim. When limit = 0, the list has no boundary length.

explodeText(text, delim, limit=0)

implodetext(list/L, delim)

    -   Returns a string formed by concatenating the elements of
        L with the delim string.