Files
marqdo/public/features/11-csv-text.mq.md
T
cflmyandCursor 506de65dae feat(stdlib): Mid M4 csv and thickened text helpers
Add lib/csv parse/stringify and expand lib/text with contains,
replace, case, pad, and related golds plus public demos.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-07 20:27:19 +08:00

25 lines
534 B
Markdown

---
title: Mid stdlib — csv and text
description: lib/csv + thickened lib/text (Mid M4)
import csv:lib/csv.mq.md
import text:lib/text.mq.md
---
# CSV cleaning with text helpers
Parse a tiny CSV, normalize a field, print — no plugins.
# main
*raw = "name,city\nAda,london\nBob,PARIS\n"*
*rows = > csv.parse text=`raw`*
*r0 = > at value=`rows` index=0*
*city = > text.to_upper text=`r0`[^city]*
> print text=`r0`[^name]
> print text=`city`
*n = > len `rows`*
1. `n` == 2
> print text=mid-m4-ok
2. *
> print text=mid-m4-fail