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.
2つのファイルをファイルストリームに読み込んで、バイトごとに比較することで比較しています。比較中に空白をスキップするにはどうすればよいですか?C#.netを使用しています
byte b; // .... if (Char.IsWhiteSpace((char) b)) { // skip... }
EDIT : Eric Lippert が指摘しているように、これはファイルのエンコーディングがプレーンな 7 ビット ASCII である場合にのみ正しいです。他のエンコーディングでは、関連するバイトをスキップします。したがって、データのエンコーディングを考慮する必要があります。