Kana Quest
这个 app 用来学习日语中的平假名(hiragana)与片假名(katakana)。 基本用户界面 这个项目的 assets.zip 压缩文件,包含两个重要的文件: kana.json 文件包含我们要使用的所有日语字符。 Bundle-...
类型(四) – 字典
mapValues mapValues() 的方法更有用,因为它可以让你转换值,并使用原始键将它们放回字典。 let cities = ['Shanghai': 24_256_800, 'Karachi': 23_500_000, 'Beijing': 21_516_000, 'Seoul': ...
类型(六) – 泛型
func inspect<T>(_ value: T) { print('Received \(type(of: value)) with the value \(value)') } inspect('Haters gonna hate') inspect(56) 限制泛型 func square<T: Numeric>(_...
批处理(一) – 根据 txt 文件中路径创建目录
根据 foldernamelist.txt 文件中的路径,在当前目录下批量创建文件夹,txt 文件中的内容如下所示: 1. Protocol\1.1 Protocol and Revised Protocols 1. Protocol\1.2. Protocol Signature Page ...
How to make function parameters isolated 如何隔离函数参数
Any properties and methods that belong to an actor are isolated to that actor, but you can make external functions isolated to an actor if you want. This allows the funct...
类型(一) – 有用的初始化器
重复值 字符串或者数组的 repeating:count: 初始化器,可以快速创建大量值。 This is a heading ============== 具体的实现代码 let heading = 'This is a heading' let underline = String(rep...






