SERVER-6062 stripTrailing now erases sequences of symbols + some basicTests for it

since you are incrementing "i" on every iteration of this loop, consider turning this into a for loop.