logo
  • 教程列表
  • SO官方文档
  • 范围
    • 积分类型范围
    • downTo() 函数
    • step() 函数
    • 直到功能
  1. StackOverflow 文档
  2. Kotlin 教程
  3. 范围
  4. 直到功能

直到功能

Created: November-22, 2018

要创建不包含其 end 元素的范围,可以使用 until 函数:

for (i in 1 until 10) { // i in [1, 10), 10 is excluded
println(i)
}
  • step() 函数

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明