Phantasmal Site > Phantasmal API > API Listing > tree_sprint
API Function: tree_sprint
- Summary:
- print LPC data to a string
- Defined In LPC Object:
- /usr/common/sys/stringd.c
- Prototype:
- string tree_sprint(mixed data, int indent)
- Can Be Called By:
- Anybody
- Description:
-
Returns the string encoding the given LPC data. This could be
used for debugging, or potentially to serialize data to a file.
The data should contain no self-references or tree_sprint may
get into an infinite loop, repeat parts of the data or otherwise
behave unpredictably.
Objects print only their names, not their contents. This limits
the use of tree_sprint for serialization.
Tree_sprint attempts to format the data for human reading, even
with large structures. This attempt does not always succeed.
The supplied 'indent' variable tells how many spaces to indent
the current data, at a minimum.
- Return Value:
-
The new string.
- Errors:
- Unrecognized DGD types may give an error.
- See Also:
- mixed_sprint
|