This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| class AuthImpl { | |
| // Simply used instead of CancellationError to easily distinguish cancellation status | |
| enum TaskResult { | |
| case response(String) | |
| case cancelled | |
| } | |
| typealias Continuation = CheckedContinuation<TaskResult, Never> | |
| enum RequestState { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| struct Unit { | |
| var notations: [String] | |
| /// 이 수를 곱하면 기준 단위로 변환됩니다. 기준 단위는 1을 가집니다. | |
| let scaleInfo: Double | |
| var isDefaultOutput = false | |
| init(notations: [String], scaleInfo: Double) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| // 숫자와 문자 나누기 | |
| func formatter(_ input: String) -> (number: Double, from: String, to: String)? { | |
| var from = String() | |
| var to = String() | |
| let inputUnit = input.trimmingCharacters(in: CharacterSet(charactersIn: "0123456789.")) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| // 숫자와 문자 나누기 | |
| func formatter(_ input: String) -> (number: Double, from: String, to: String)? { | |
| var from = String() | |
| var to = String() | |
| let inputUnit = input.trimmingCharacters(in: CharacterSet(charactersIn: "0123456789.")) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| // 숫자와 문자 나누기 | |
| func divide(_ input: String) -> (number: Double, from: String, to: String)? { | |
| var from = String() | |
| var to = String() | |
| let inputUnit = input.trimmingCharacters(in: CharacterSet(charactersIn: "0123456789.")) | |