In this tutorial I will show you how to split string on "\n" to new line in c#. If you have a line break in paragraph text, it will split perfectly.
C# Code for split on string:
string[] lines = paragraphs.Split(
new string[] { "\r\n", "\r", "\n" },
StringSplitOptions.None
);
Post your comments / questions
Recent Article
- OSError: cannot open resource - Python
- Python read file line count
- How to Encode & Decode using Base64 in Python?
- Unspecified error-The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support.
- How to generate a Captcha verification code image with Python?
- How to show an image using path python PIL?
- How to remove Background from the images using Python?
- Python generate QR code image
Related Article