Start Info Community Spielen
 
 

Morgengrauner Dokumentation

Dateipfad: /home/mud/mudlib/doc//efun/to_string

SYNOPSIS
        string to_string(mixed)

        (string)

DESCRIPTION
        The argument is converted to a string. Works with int, float,
        object, arrays, structs, symbols, strings and closures.

        Converts closures and structs into an appropriate name (this
        has mostly debugging purposes).

        CAVEAT: Arrays are considered exploded strings, ie. arrays of
        Unicode codepoints (i.e. each number is one Unicode character),
        and are 'imploded' up to the first non-number entry, whatever
        comes first. That means that to_string(({ 49, 50 })) will return
        "12" and not "({ 49, 50 })".

BUGS
        The cast notation only works if the precise type of 
        is known at compile-time. This will not be fixed - use the
        function form instead.

HISTORY
        LDMud 3.2.8 adds lambda closures to the accepted data types.
        LDMud 3.3.250 adds structs to the accepted data types.

SEE ALSO
        to_array(E), to_int(E), to_object(E), to_struct(E), sprintf(E)


zurück zur Übersicht

YOUTUBE | FACEBOOK | TWITTER | DISCORD | FEEDBACK | IMPRESSUM | DATENSCHUTZ 1992–2023 © MorgenGrauen.