What is the difference between vbcr, vblf, and vbcrlf?

Source: Internet
Author: User
On msdn:
Vbcrlf
CHR (13) + CHR (10)
Carriage return/line feed combination.

Vbcr
CHR (13)
Carriage return.

Vblf
CHR (10)
Line Break.

HoweverCodeThe actual results are the same. What is the difference?

Msgbox (vbcrlf & "")

Msgbox (vbcr & "")

Msgbox (vblf & "")
======================================
For example:
Dim A as string = "1 23 456 789"
Dim B () as string = A. Split (New char () {vbcr })
Dim B () as string = A. Split (New char () {vblf })

There is no difference in the same results
__________________________________________________________________________
Try
Dim A as string = "1" & vbcr & vblf & "23" & vb cr & vblf & "456" & vbcr & vblf & "789"
Dim B () as string = A. Split (New char () {vbcr })
Dim C () as string = A. Split (New char () {vblf })
Dim D () as string = A. Split (New char () {vbcr, vblf })
Dim E () as string = Split (A, vbcrlf)
By carefully analyzing the split string array, such as the length and each character of the substring, you can find the differences
__________________________________________________________________________
The carriage return and line feed are two characters. I remember the history as follows (not quite clear, as if it was like this ):

In the early Mac system, line breaks were used to achieve text line breaks. This is an orthodox approach. In Unix systems, carriage returns represent text line breaks, both of which are invisible characters, after the appearance of DOS, Bill Gates used the combination of the two to implement line feed in order to realize that all documents under DOS can be read in MAC and Unix systems (that is, all documents under DOS, in this way, DOS files are not displayed on Mac or UNIX. This is why sometimes UNIX text files are displayed in a line under Win...
__________________________________________________________________________
In the DOS era, these two characters have their own division of labor. Cr: move the cursor back to the beginning of the line. Lf: move the cursor down one line.

however, in windows, there is basically only Cr, that is, CR has both LF functions. Lf becomes dispensable and can only be used on some terminal interfaces, such as telnet.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.