string package:yaml

Encodes a string with the supplied style. This function handles the empty string case properly to avoid https://github.com/snoyberg/yaml/issues/24
Determine whether a string must be quoted in YAML and can't appear as plain text. Useful if you want to use setStringStyle.
Set the string style in the encoded YAML. This is a function that decides for each string the type of YAML string to output. WARNING: You must ensure that special strings (like "yes"/"no"/"null"/"1234") are not encoded with the Plain style, because then they will be decoded as boolean, null or numeric values. You can use isSpecialString to detect them. By default, strings are encoded as follows:
Strings which must be escaped so as not to be treated as non-string scalars.