文字列の改行を徹底的に削除

イラストレーター 改行コード で改行の削除はとりあえず可能になったが、他所のイラスト屋さんから送られてきたイラストレーターファイルには「vbCr」では取れない物も存在した。
イカン!これではイカン!!という事で、Replace と StringReader の2段構えで処理することに。

   Dim temStr As String = String.Empty : Dim temCon As String = String.Empty

   temCon = tItem.Contents

   Dim chars() As Char = {"vbCrLf", "vbCr", "vbLf", "^C"}
   For n1 As Integer = 0 To chars.Length - 1
       temCon = Replace(temCon, chars(n1), String.Empty) 'Replaceで文字列の改行を削除
   Next

   Dim StrReader1 As New StringReader(temCon) 'Replaceで取りきれないモノはStringReaderで処理
   temCon = String.Empty
   While True
       temStr = StrReader1.ReadLine()
       If temStr Is Nothing Then
           Exit While
       Else
           temCon = temCon & temStr
       End If
   End While