Self-intersection of cosmic strings