Skip to main content

spec.toml_string

spec.toml_string(value)

The TOML basic string for value; the one string writer of the package.

Parameters

Name Type Description Default
value str Any string. required

Returns

Name Type Description
str str The string in double quotes with every escape that TOML needs.

Examples

from babregen.spec import toml_string

print(toml_string('say "hi"' + chr(10)))
"say \"hi\"\n"