What is VB.NET's newline keyword?

Started by
3 comments, last by Drew_Benton 19 years, 2 months ago
Question says it all, I guess. Thanks.
Advertisement
vbCrLf.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Great, thanks.
Actually, if you want C style escape characters:
    'simple iterative string processor to convert C style escape sequences (written by Promit Roy)    Public Function EscapeString( Text As String ) As String        Dim Res As String        Dim Arr As Char()        Dim i As Integer        Arr = Text.ToCharArray()                i = 0        Do While i < Arr.Length()            If Arr(i) = "\" Then                'process it                i += 1                Select Case Arr(i)                    Case "t"                        Res += vbTab                    Case "r"                        Res += vbCr                    Case "n"                        Res += vbLf                    Case "v"                        Res += vbVerticalTab                    Case "f"                        Res += vbFormFeed                    Case "'"                        Res += "'"                    Case """"       'double quote                        Res += """"                    Case "b"                        Res += vbBack                    Case "0"                        Res += vbNullChar                    Case "a"                        Res += Chr( &H7 )                    Case "\"                        Res += "\"                    Case Else                        'don't do anything with res                End Select            Else                Res += Arr(i)            End If            i += 1        Loop        Return Res    End Function


It's not nearly as powerful as the actual C escape sequences, but provides most of the common escape characters.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Ohh, that's a nice one Promit.

This topic is closed to new replies.

Advertisement