Passer au contenu principal
Version: latest - a1.142.x ⚖️

TOML

Bibliothèque TOML.

🗿Static Class
This is a Static Class. Access it's methods directly with .. It's not possible to spawn new instances.
🧑‍💻API Source
This page is auto-generated! The Functions, Properties and Events described here are defined in our GitHub's API Repository! Feel free to commit suggestions and changes to the source .json API files!

🎒 Examples

(TOML.Dump) Stringifies a Lua table
local encoded_value = TOML.Dump({ 1, 2, 3, { x = 10, y = Vector(1, 2, 3) }, "he" })
-- Outputs "[ 1, 2, 3, { y = "Vector(1.000000, 2.000000, 3.000000)", x = 10 }, "he" ]"
(TOML.Parse) Parses a TOML string into a Lua table
local decoded_value = TOML.Parse("my_table = [ 1, 2, 3 ]")
-- Outputs "the table { ["my_table"] = { [1] = 1, [2] = 2, [3] = 3 } }"

🗿 Static Functions

ReturnsNameDescription
stringDumpRenvoie une chaîne représentant la valeur encodée en TOML
anyParseRenvoie une valeur représentant la chaîne TOML décodée

Dump

Renvoie une chaîne représentant la valeur encodée en TOML
local ret = TOML.Dump(value)

Parameters

TypeParameterDefaultDescription
tablevalue Required parameter La table qui sera convertie en TOML

Returns

TypeDescription
stringLa table au format TOML
TOML.Dump Examples
Stringifies a Lua table
local encoded_value = TOML.Dump({ 1, 2, 3, { x = 10, y = Vector(1, 2, 3) }, "he" })
-- Outputs "[ 1, 2, 3, { y = "Vector(1.000000, 2.000000, 3.000000)", x = 10 }, "he" ]"

Parse

Renvoie une valeur représentant la chaîne TOML décodée
local ret = TOML.Parse(value)

Parameters

TypeParameterDefaultDescription
stringvalue Required parameter Le TOML qui sera converti en table

Returns

TypeDescription
anyLe TOML sous forme de table
TOML.Parse Examples
Parses a TOML string into a Lua table
local decoded_value = TOML.Parse("my_table = [ 1, 2, 3 ]")
-- Outputs "the table { ["my_table"] = { [1] = 1, [2] = 2, [3] = 3 } }"