"\r\n")) { // CRLF を含む場合 } else { // CRLF を含まない場合 } なお上記では、string に null が渡されるとします。 null が渡される可能性がある場合は、判定処を「if (scanData != null && scanData.Contains"\r\n"))」 もしくは「if ((scanData ?? "").Contains"...
$file test.sh test2.shtest.sh: Bourne-Again shell script, ASCII text executable, with CRLF line terminators test2.sh: Bourne-Again shell script, ASCII text executable がっつりwith CRLF line terminatorsって書いてありますね。 Windows: CR(\r)+LF(\n) Linux(UNIX): LF(\n) そりゃそうな...