특수한 문자열을 출력하려면 양끝에 #을 붙여주면된다.
import Foundation
print(#"!@#$%^&*(\'"<>?:;"#)
//!@#$%^&*(\'"<>?:; 그대로 출력됨.
'iOS > Swift문법' 카테고리의 다른 글
Swift 알고리즘 클럽 (0) | 2023.06.30 |
---|---|
Swift 기본문법) 구조체와 클래스 (0) | 2023.06.30 |
Swift 기본문법) 컬렉션 타입 (0) | 2022.09.05 |
Swift 기본문법) 기본 데이터 타입 (1) | 2022.08.31 |
Swift 기본문법) 상수와 변수 (1) | 2022.08.30 |