encodeToString

Encodes this layout as one line-based string, for a preferences store, a database column, or a file.

The format is versioned and its contents are an implementation detail: hand back exactly what you were given, and read it with decodeFromString. Every value is escaped, so a filter query holding spaces, newlines, or = round-trips unchanged. Encoding is deterministic — the same layout always produces the same string — so it can be compared to decide whether anything is worth saving.