replacingOccurrences(of: 치환하고싶은문자, with: 치환하고자하는 문자) var text = "해리 포터: 불의 잔" text = text.replacingOccurrences(of: " ", with: "_") print(text) // "해리_포터:_불의_잔" https://developer.apple.com/documentation/foundation/nsstring/1412937-replacingoccurrences Apple Developer Documentation developer.apple.com 틀린부분이 있거나, 더 좋은 방법이 있다면 댓글로 남겨주세요! 🌈댓글은 언제나 환영입니다🙏🏻