ref: 8fffc0be8c026118884aa4685246c797927f38b9
dir: /lib/std/chomp.myr/
use "hasprefix"
pkg std =
const chomp : (str : byte[:]#, pfx : byte[:] -> bool)
;;
const chomp = {str, pfx
if std.hasprefix(str#, pfx)
str# = str#[pfx.len:]
-> true
else
-> false
;;
}