fromString

fun fromString(content: String, origin: String? = null): TomlSource(source)

Parses TOML text that is already in memory. Blank text gives an empty source, and invalid TOML throws ktoml's parse exception. origin, such as the file name, labels the source in ConfigLoader.explain reports.