Add a string (and filename) cutting utility routine.