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