回答編集履歴
5
コードの追加
test
CHANGED
@@ -1 +1,9 @@
|
|
1
1
|
Qiitaのコードをそのまま丸写しでよかったんでは?
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
```c#
|
6
|
+
|
7
|
+
textasset = Resources.Load("Test", typeof(TextAsset) )as TextAsset; //Resourcesフォルダから対象テキストを取得
|
8
|
+
|
9
|
+
```
|
4
編集
test
CHANGED
@@ -1,27 +1 @@
|
|
1
|
-
改行で分けるなら
|
2
|
-
|
3
|
-
```c#
|
4
|
-
|
5
|
-
//Splitで一行づつを代入した1次配列を作成
|
6
|
-
|
7
|
-
string[] sep = {"\r\n"};
|
8
|
-
|
9
|
-
textMessage = TextLines.Split(sep, StringSplitOptions.None);
|
10
|
-
|
11
|
-
```
|
12
|
-
|
13
|
-
のほうが良いかもしれません。
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
1
|
+
Qiitaのコードをそのまま丸写しでよかったんでは?
|
20
|
-
|
21
|
-
```c#
|
22
|
-
|
23
|
-
columnLength = textMessage[0].Split(',').Length;
|
24
|
-
|
25
|
-
```
|
26
|
-
|
27
|
-
これでは分割できません。
|
3
内容修正
test
CHANGED
@@ -10,15 +10,9 @@
|
|
10
10
|
|
11
11
|
```
|
12
12
|
|
13
|
-
|
13
|
+
のほうが良いかもしれません。
|
14
14
|
|
15
|
-
```c#
|
16
15
|
|
17
|
-
//Splitで一行づつを代入した1次配列を作成
|
18
|
-
|
19
|
-
textMessage = TextLines.Split('\n');
|
20
|
-
|
21
|
-
```
|
22
16
|
|
23
17
|
|
24
18
|
|
2
コード修正
test
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
//Splitで一行づつを代入した1次配列を作成
|
18
18
|
|
19
|
-
textMessage = TextLines.Split(
|
19
|
+
textMessage = TextLines.Split('\n');
|
20
20
|
|
21
21
|
```
|
22
22
|
|
1
追記
test
CHANGED
@@ -7,6 +7,16 @@
|
|
7
7
|
string[] sep = {"\r\n"};
|
8
8
|
|
9
9
|
textMessage = TextLines.Split(sep, StringSplitOptions.None);
|
10
|
+
|
11
|
+
```
|
12
|
+
|
13
|
+
こっちでもいけるかな?
|
14
|
+
|
15
|
+
```c#
|
16
|
+
|
17
|
+
//Splitで一行づつを代入した1次配列を作成
|
18
|
+
|
19
|
+
textMessage = TextLines.Split("\n");
|
10
20
|
|
11
21
|
```
|
12
22
|
|