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