• [email protected]

Erv's Useful Notes

  • Home

  • Home
  • Tag: string

Tag: string

C# Split String on CRLF, CR, or LF

Posted by: [email protected] Posted on: March 14, 2019 C# , string

One line split:

string[] lines = theText.Split(
    new[] { "\r\n", "\r", "\n" },
    StringSplitOptions.None
);

https://stackoverflow.com/questions/1547476/easiest-way-to-split-a-string-on-newlines-in-net

Recent Posts

  • VisualBasic.NET is getting quietly retired, sorta of
  • Surviving the Coronavirus: Get Offline While Staying In Touch
  • Remove Namespaces from XML Document
  • PowerShell 6 Logical Operators
  • Remote Logoff Windows User

Recent Comments

    Archives

    • March 2020
    • February 2020
    • May 2019
    • April 2019
    • March 2019

    Categories

    • Art
    • ASCII
    • BASIC
    • C#
    • Coronavirus
    • Database
    • Emoji
    • Geocoding
    • Icons
    • JavaScript
    • Lambda
    • LINQ
    • Oracle
    • PowerShell
    • SQL
    • Stupidly Useful
    • Windows
    • XML

    Meta

    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org

    Copyright 2019, WordPress Theme By Webdzier