Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Swift Tuist
- Firebase Analytics
- ios
- Tuist
- xcode
- Firebase
- Subscribe
- swift
- swift db
- swift database
- GCD
- realm
- ribs
- uitableviewdiffabledatasource
- KeyPath
- swift 5.9
- Combine
- JSON
- observable
- ios database
- SeSAC
- swift 6
- Subject
- 카카오뱅크 ios
- Tuist Swift
- RxSwift
- SwiftUI
- combinecocoa
- 네트워크 통신
- arc
Archives
- Today
- Total
천원의 개발
swift n진법 변경하기! 본문
프로그래머스 문제를 푸는 도중 진수를 변경하는 문제를 풀기 위해 공부하였다!!
let a = String(15, radix: 2) // 2진수로 변경!
print(a) // 1111 출력
let b = Int(a, radix: 2)! // 2진수를 다시 10진수로 변경!
print(b) // 15 출력
https://developer.apple.com/documentation/swift/int/init(_:radix:)/
'Swift 코딩테스트 준비' 카테고리의 다른 글
swift Dictionary 정렬하기 (0) | 2022.05.30 |
---|---|
swift outerLoop 사용법 (0) | 2022.05.29 |
stride(form: to: by:) (0) | 2022.05.18 |
uppercased, lowercased (0) | 2022.05.18 |
Swift forEach 정리 (0) | 2022.05.15 |