오늘은 문자열을 어떤 문자를 기준으로 끊을 때 사용하는components(separatedBy: ) 와 split(separator: )의 차이에 대해알아보려고 한다. 더보기> components(separatedBy: ) 와 split(separator: ) 공식 문서 보러 가기 https://developer.apple.com/documentation/foundation/nsstring/1413214-components components(separatedBy:) | Apple Developer DocumentationReturns an array containing substrings from the receiver that have been divided by a given separator...
오늘은 Swift의 Stride에 대해 간단히 정리해보겠다. 더보기> stride 관련 공식 문서 (through와 to) 보러 가기 https://developer.apple.com/documentation/swift/stride(from:to:by:) stride(from:to:by:) | Apple Developer DocumentationReturns a sequence from a starting value to, but not including, an end value, stepping by the specified amount.developer.apple.com https://developer.apple.com/documentation/swift/stride(from:through:by:) ..
데이터 타입프로그램 내에서 다뤄지는 데이터의 종류구조체를 타입의 기반으로 삼아 Swift의 다양한 기능 (extension, Generic) 두루 사용하여 구현 (1) Int와 UInt• Int : +, - 부호를 포함한 정수• UInt : - 부호를 포함하지 않는 0을 포함한 양의 정수 ※ 진수에 따른 정수 표현- 10진수- 2진수 : 접두어 0b 사용- 8진수 : 접두어 0o 사용- 16진수 : 접두어 0x 사용let decimalInteger: Int = 28let binaryInteger: Int = 0b11100let octalInteger: Int = 0o34let hexadecimalInteger: Int = 0x1C (2) Bool Boolean 타입으로, true / false만 값으..