- Note for Mac users: Don’t expect to see a display like the one above in Word for the Mac. Although many Mac fonts contain at least the ¼, ½, and ¾ fractions, the MacRoman Character Set does not contain them, so there are no built-in keystrokes for the characters, and the Symbol dialog in Word won’t show them to you because it is capable.
- Jul 31, 2017 There are severl characters that act as line break. There are several names; line break, new line, carriage return, paragraph break etc. Today, while doing a bit of data processing, I was required to remove all the line breaks (carriage return) in an MS-Word document and replace line.
- Access to a full suite of conversion tools. You can use any of our tools, in addition to our PDF separator, at any time, all for free. With so many tools for you to use, you can easily split PDF pages, extract pages from PDF, merge and compress PDFs, convert a variety of file types to PDF, and convert PDF files into file types such as Word, Excel, and more.
The Line Feed (LF) character (0x0A, n) moves the cursor down to the next line without returning to the beginning of the line. This character is used as a new line character in UNIX based systems (Linux, Mac OSX, etc) The End of Line (EOL) sequence (0x0D 0x0A, rn) is actually two ASCII characters, a combination of the CR and LF characters.
This article describes how word and paragraph boundaries are defined, how line breaks are represented, and how you can separate a string by paragraph.
Word For Mac Separator Liner
Word Boundaries
The text system determines word boundaries in a language-specific manner according to Unicode Standard Annex #29 with additional customization for locale as described in that document. On OS X, Cocoa presents APIs related to word boundaries, such as the
NSAttributedString
methods doubleClickAtIndex:
and nextWordFromIndex:forward:
, but you cannot modify the way the word-boundary algorithms themselves work.Line and Paragraph Separator Characters
There are a number of ways in which a line or paragraph break can be represented. Historically,
n
, r
, and rn
have been used. Unicode defines an unambiguous paragraph separator, U+2029
(for which Cocoa provides the constant NSParagraphSeparatorCharacter
), and an unambiguous line separator, U+2028
(for which Cocoa provides the constant NSLineSeparatorCharacter
).In the Cocoa text system, the
NSParagraphSeparatorCharacter
is treated consistently as a paragraph break, and NSLineSeparatorCharacter
is treated consistently as a line break that is not a paragraph break—that is, a line break within a paragraph. However, in other contexts, there are few guarantees as to how these characters will be treated. POSIX-level software, for example, often recognizes only n
as a break. Some older Macintosh software recognizes only r
, and some Windows software recognizes only rn
. Often there is no distinction between line and paragraph breaks.![Word For Mac Separator Line Word For Mac Separator Line](/uploads/1/1/7/8/117836604/800408482.jpg)
Word For Mac Separator Line Word
Which line or paragraph break character you should use depends on how your data may be used and on what platforms. The Cocoa text system recognizes
n
, r
, or rn
all as paragraph breaks—equivalent to NSParagraphSeparatorCharacter
. When it inserts paragraph breaks, for example with insertNewline:
, it uses n
. Ordinarily NSLineSeparatorCharacter
is used only for breaks that are specifically line breaks and not paragraph breaks, for example in insertLineBreak:
, or for representing HTML <br>
elements.If your breaks are specifically intended as line breaks and not paragraph breaks, then you should typically use
NSLineSeparatorCharacter
. Otherwise, you may use n
, r
, or rn
depending on what other software is likely to process your text. The default choice for Cocoa is usually n
.Separating a String “by Paragraph”
A common approach to separating a string “by paragraph” is simply to use:
This, however, ignores the fact that there are a number of other ways in which a paragraph or line break may be represented in a string--
r
, rn
, or Unicode separators. Instead you can use methods—such as
enumerateSubstringsInRange:options:usingBlock:
and enumerateLinesUsingBlock:
—that take into account the variety of possible line terminations, as illustrated in the following example.Microsoft Word Separator Line
Copyright © 1997, 2014 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2014-02-11