Composing Small Text Formatters
Separate value formatting, escaping, and record layout according to the target representation expected at each stage.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
Trace an exact field
The number twelve can become text "12". A field containing a comma needs the quoting rule of CSV before being placed in a record. Writing a structured row describes that grammar boundary.
Check effects of reordering
Escaping a field and then wrapping it can be necessary under the format. Escaping an entire already assembled row may turn delimiters into data. See escaping and encoding for why these transformations have separate roles.[1]