M
mwazir
Can someone please explain this to me
Dim str As String = Chr(12)
Debug.WriteLine(str) ' Output shows the line feed junk character
Dim iLen As Integer = str.Trim.Length
Debug.WriteLine(iLen) ' Output window shows 0
Dim iLenNoTrim As Integer = str.Length
Debug.WriteLine(iLenNoTrim) ' Output window shows 1
I thought Trim removes all leading and trailing spaces. I didnt understand
why Trim removes CHR(12).
CHR(12) is a line feed character
TIA
Dim str As String = Chr(12)
Debug.WriteLine(str) ' Output shows the line feed junk character
Dim iLen As Integer = str.Trim.Length
Debug.WriteLine(iLen) ' Output window shows 0
Dim iLenNoTrim As Integer = str.Length
Debug.WriteLine(iLenNoTrim) ' Output window shows 1
I thought Trim removes all leading and trailing spaces. I didnt understand
why Trim removes CHR(12).
CHR(12) is a line feed character
TIA