Ah, I see—trim doesn't accept an argument, so passing '\n' was ineffective...