Table.fromString: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{Useful Function}} <lowercasetitle></lowercasetitle> __NOTOC__ This function converts string to a table.<br/> <span style='color:#AA0000'>If '''str''' is not a table, this fu...") |
(No difference)
|
Revision as of 17:44, 24 August 2021
This function converts string to a table.
If str is not a table, this function will throw an error.
Syntax
string table.fromString( string str )
Required Arguments
- str: The string to convert.
Returns
Returns table if string was successfully converted, false otherwise.
Click to collapse [-]
Shared functionfunction table.fromString(str) if type(str) ~= 'string' then return false end return (loadstring)('return '..str)() end
Author: Tracer