I want to read every line out of a WPF richtextbox. I have the following code, but don't know how to proceed:
                string rtbContents = new TextRange(rtbPaths.Document.ContentStart, rtbPaths.Document.ContentEnd).Text;
                foreach (string line in rtbContents.Split(/* new line */))
                    // Do something with every line that is not empty after trim
How do I split on a return? (In vb winforms you have control keys, but I can't find it in a c# wpf app.)
How do I trim the lines (and also remove the \r and other things)?