ref: 78da203b42b5084a7664e8773f418a4730184d53
dir: /lib/std/test/chomp.myr/
use std const main = { check("aaab", "aaa", "b") check("aaa", "aaa", "") check("aa", "aaa", "aa") } const check = {sl, pfx, expected var r r = sl std.chomp(&r, pfx) std.assert(std.sleq(r, expected), \ "expected chomp({}, {}) => {}, got {}\n", sl, pfx, expected, r) }