Faster port stripping with indexOf