Stringify Sub-Module Documentation⚓︎
Overview⚓︎
The Stringify sub-module consists of one function that converts a given table into a string value, similar to how tables are printed in Roblox Studio.
Functions⚓︎
Stringify⚓︎
Purpose⚓︎
Converts a given table to a good-looking string representation.
Syntax⚓︎
Stringify(Table: table, TabSize: number?, IndentionCharacter: string?, IsRecursive: boolean?, Cache: table?, CIndention: number?): boolean
Parameters⚓︎
Table: string
The input table to convert.IndentionSize: number
Optional
The size of the indentation in spaces/provided character if any.
Default is4
.IndentionCharacter: string
Optional
The character to use for indentation.
Default is a space character" "
.Recursive: boolean
Optional
A boolean indicating whether to recursively process nested tables.
Default isfalse
.Cache: table
Optional
A table to use as a cache to detect circular references1 (Used by the function's recursive calls).CIndention: number
Optional
The current level of indentation (Used by the function's recursive calls).
Returns⚓︎
- string
The string representation of the given table.
Examples⚓︎
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
|
-
Circular reference is a situation in which two tables/values reference each other (e.g.
table.__index = table
). ↩