如果我们有一个 val txt: kotlin.String = "1;2;3;" 并想将其拆分为数字数组,我们可以尝试以下操作: val numbers = string.split(";".toRegex()) //gives: [1, 2, 3, ]
確定! 回上一頁