Dokumentation zu: reverse(E)

HR Image


SYNOPSIS
        int     reverse(int arg)
        string  reverse(string arg)
        bytes   reverse(bytes arg)
        mixed * reverse(mixed * arg)
        mixed * reverse(mixed * & arg)

DESCRIPTION
        Reverse the content of array, string or byte sequence <arg> and
        return the result. If <arg> is an integer, the bits in the
        integer are reversed.

        If called in the reference variant, the argument array itself
        is reversed and then returned.

EXAMPLES
        reverse(0x306a) - returns 0x560c0000

        reverse("test") - returns "tset"

        mixed * arr = ({ 1, 2 });
        reverse(arr)  - returns ({ 2, 1 }), leaves arr unchanged.
        reverse(&arr) - returns ({ 2, 1 }), sets arr to ({ 2, 1 })

BUGS
        Reference ranges like reverse(&(a[1..2])) are not supported.

HISTORY
        Introduced in LDMud 3.3.529.
        LDMud 3.3.532 added the reversal of bits in an integer.

SEE ALSO

Die Seite ist auch in Deutsch vorhanden.

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