ref: c2cead0d7e100e3c6f808af1bfaea25e151c53c0
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
;;
}