← All guides

URLTO GUIDE

Check newline types and trailing empty lines

Lines are separated by newline characters. Distinguish actual newlines from visual wrapping.

URLTO editorial · Updated

Text counts · series05 / 10

Input and processing example

Compare it yourself · Illustrative example

입력 / Input: A
B → 2줄 / lines
입력 / Input: A
 → 2줄 / lines, 마지막 줄은 비어 있음 / last line empty
빈 입력 / empty → 0줄 / lines

Steps to verify

  • Distinguish wrapping from newlines.
  • Check for a trailing newline.
  • Compare lines in the final copy.

How to interpret the result

LF, CRLF and CR form line boundaries. CRLF contains two characters for character and byte counts but represents one boundary.

Deciding what to do next

Editor wrapping does not add real lines. Prepare intended boundaries before duplicate-line removal.

Feature scope

Count code points, non-whitespace characters, UTF-8 bytes, whitespace-separated words and lines in the browser, not glyphs or every publishing service’s limits.

Frequently asked questions

Does an empty line count?

Empty units created by newlines count; completely empty input is zero.

Use now Text counts