AoC/2018/AoC/scanner.swift
2022-11-23 16:46:40 +01:00

14 lines
267 B
Swift

import Foundation
extension Scanner {
func scan(string: String) -> Bool {
return scanString(string, into: nil)
}
func scan() -> Int? {
var result: Int = 0
guard scanInt(&result) else { return nil }
return result
}
}