public string GetLineText (int line) { var lineSegment = GetLine (line); return lineSegment != null ? GetTextAt (lineSegment.Offset, lineSegment.Length) : null; }
static string StripHeader(string content) { var doc = new Mono.TextEditor.TextDocument(content); while (true) { string lineText = doc.GetLineText(1); if (lineText == null) { break; } if (lineText.StartsWith("//")) { doc.Remove(doc.GetLine(1).SegmentIncludingDelimiter); continue; } break; } return(doc.Text); }