본문 바로가기

Programming/Swift

Properties and Methods

String: A Unicode string value that is a collection of characters.

 

Declaration

@frozen struct String

Overview

A string is a series of characters, such as "Swift", that forms a collection. Strings in Swift are Unicode correct and locale insensitive, and are designed to be efficient. The String type bridges with the Objective-C class NSString and offers interoperability with C functions that works with strings.

You can create new strings using string literals or string interpolations. A string literal is a series of characters enclosed in quotes.

let greeting = "Welcome!"

 

developer.apple.com/documentation/swift/string#//apple_ref/doc/uid/TP40015181-CH1-DontLinkElementID_31

 

Apple Developer Documentation

 

developer.apple.com

 

'Programming > Swift' 카테고리의 다른 글

Storyboard 추가하기  (0) 2020.10.14
mutating  (0) 2020.10.13
Swift Optionals  (0) 2020.10.13
Enumeration (열거형: list)  (0) 2020.10.13
상수 constant  (0) 2020.10.13