Dokumentation zu: implode(E)

HR Image


SYNOPSIS
        string implode(string *arr, string del)
        bytes implode(bytes *arr, bytes del)

DESCRIPTION
        Concatenate all strings found in array arr, with the string
        del between each element. Only strings are used from the array.
        Works similar with arrays of byte sequences.

EXAMPLES
        function                                        returns
        -------------------------------------------------------------------
        implode(({ "foo", "bar", "" }), "*")            "foo*bar*"
        implode(({ "a", 2, this_object(), "c" }), "b")  "abc"

        Together with explode() this can be used as a search and replace
        function of strings:
        implode(explode("a short text", " "), "_")      "a_short_text"

        But nowadays you can also use
            regreplace("a short text", " ", "_", 1)
        instead.

SEE ALSO
        explode(E), regreplace(E)

Die Seite ist auch in Deutsch vorhanden.

Start » Magierhandbuch » Docu » Efun » Implode Letzte Generierung: 25.04.2021, 01:58
Email an: mud@wl.mud.de
Valid HTML 4.01!