Cosmic strings and strings in gravitational waves