問題文
function solution(text)を書いてください。入出力はJSON値です。入力配列やオブジェクトを変更しないでください。外部ライブラリ・ネットワーク・非同期関数は使えません。 text is valid CSV. Separator is comma; records use LF, CRLF or CR. A field may be fully double-quoted; inside it retain commas/newlines and unescape doubled quotes. Do not trim whitespace. A terminal record separator adds no phantom row. Empty text returns []; a blank record is ['']. Return arrays of field strings. Malformed CSV is outside the contract. 入力範囲:各入力配列は最大50,000項目、文字列は最大1,000文字です。数値は有限値で、整数と整数の合算結果はJavaScriptの安全な整数範囲内です。その他の型と有効性は上記の規則に従います。
入出力例
例 1
関数の引数
[ "a,b\n1,2" ]
戻り値
[
[
"a",
"b"
],
[
"1",
"2"
]
]例 2
関数の引数
[ "\"a,b\",\"x\"\"y\"\r\n3,4" ]
戻り値
[
[
"a,b",
"x\"y"
],
[
"3",
"4"
]
]例 3
関数の引数
[ "서울,\"공백\"" ]
戻り値
[
[
"서울",
"공백"
]
]