質問編集履歴
1
変数が混雑していたので直しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -18,19 +18,19 @@
|
|
18
18
|
|
19
19
|
val sentence = text1.text.split("。").toTypedArray()
|
20
20
|
|
21
|
-
var
|
21
|
+
var a = 0
|
22
22
|
|
23
|
-
while (
|
23
|
+
while (a < sentence.toString().count()){
|
24
24
|
|
25
|
-
if (sentence[
|
25
|
+
if (sentence[a].contains(" [ ] ")) {
|
26
26
|
|
27
|
-
Log.d("
|
27
|
+
Log.d("a", "${a}")
|
28
28
|
|
29
29
|
a++
|
30
30
|
|
31
31
|
} else {
|
32
32
|
|
33
|
-
sentence.removeAt(
|
33
|
+
sentence.removeAt(a) //ここがエラー
|
34
34
|
|
35
35
|
}
|
36
36
|
|