I'm not sure `trim` is a good name because that usually means taking characters off from one end or the other, not the middle. I don't know if there a name for removing characters from the middle, i've been calling it "condense" in my head.