Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
現在、CSVファイルを1行ずつインポートすると、メソッドが長さ5の配列を返すString.split(",")ような行がある場合、. 長さ 8 の配列を返すメソッドを取得するにはどうすればよいですか?"foo,,bar,,fizz,,,"["foo", "", "bar, "", "fizz"]["foo", "", "bar", "", "fizz, "", "", ""]
String.split(",")
"foo,,bar,,fizz,,,"
["foo", "", "bar, "", "fizz"]
["foo", "", "bar", "", "fizz, "", "", ""]
それを達成する別のオーバーロードがあります:split
split
string.split(",", -1);