chickadee » data-structures » string-chomp

string-chomp STRING #!optional SUFFIXprocedure

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".