반응형
카테고리 (Category) | 작성 날짜 (Write Date) | 최근 수정 날자 (Recent Write Date) | 작성자 (Writer) |
iOS | 2020.07.18. 13:11 | 2021.10.31. 21:08:59 | Dev.Yang |
🗂 Swift Lanuage C/C++ Interoperability Type
C Language Data Type | Swift (C Interoperability) Type | Typealias |
bool | CBool | Bool |
char,unsigned char | CChar, CUnsignedChar | Int8, UInt8 |
short, unsigned short | CShort, CUnsignedShort | Int16, UInt16 |
int, unsigned int | CInt, CUnsignedInt | Int32, UInt32 |
long, unsigned long | CLong, CUnsignedLong | Int, UInt |
long long, unsigned long long | CLongLong, CUnsignedLongLong | Int64, UInt64 |
wchar_t, char16_t, char32_t | CWideChar, CChar16, CChar32 | UnicodeScalar, UInt16, UnicodeScalar |
float, double | CFloat, CDouble | Float, Double |
🗂 Swift Lanuage C/C++ Interoperability Description
🏷 CBool
- The C ‘_Bool’ and C++ ‘bool’ type.
typealias CBool = Bool
🏷 CChar
- The C ‘char’ type. This will be the same as either CSignedChar (in the common case) or CUnsignedChar, depending on the platform.
typealias CChar = Int8
🏷 CChar16
- The C++11 ‘char16_t’ type, which has UTF-16 encoding.
typealias CChar16 = UInt16
🏷 CChar32
- The C++11 ‘char32_t’ type, which has UTF-32 encoding.
typealias CChar32 = Unicode.Scalar
🏷 CDouble
- The C ‘double’ type.
typealias CDouble = Double
🏷 CFloat
- The C ‘float’ type.
typealias CFloat = Float
🏷 CInt
- The C ‘int’ type.
typealias CInt = Int32
🏷 CLong
- The C ‘long’ type.
typealias CLong = Int
🏷 CWideChar
- The C++ ‘wchar_t’ type.
typealias CWideChar = Unicode.Scalar
🏷 CLongLong
- The C ‘long long’ type.
typealias CLongLong = Int64
🚀 REFERENCE
반응형
'# 애플 [Apple] > iOS' 카테고리의 다른 글
[iOS] UIViewController 생명주기 (Life Cycle) (0) | 2021.10.24 |
---|---|
[iOS] Core Data (0) | 2020.09.21 |
[iOS] UTC 날짜 및 다양한 날짜 포멧 (UTC Date and Time in Various Formats) (0) | 2020.07.11 |
[iOS] Swift 고차 함수 (Higher-order function) (0) | 2020.06.05 |
[iOS] Xcode에서 파이썬 빌드하기 (Running Python in Xcode) (0) | 2020.05.14 |
댓글