chickadee » data-structures » string-chomp

(string-chomp STRING [SUFFIX]) procedure

If STRING ends with SUFFIX, then this procedure returns a copy of its first argument with the suffix removed, otherwise returns STRING unchanged. SUFFIX defaults to "\n".