Mono.TextEditor.TextDocument.GetLineText C# (CSharp) Method

GetLineText() public method

Gets the line text without the delimiter.
public GetLineText ( int line ) : string
line int /// The line number. ///
return string
		public string GetLineText (int line)
		{
			var lineSegment = GetLine (line);
			return lineSegment != null ? GetTextAt (lineSegment.Offset, lineSegment.Length) : null;
		}
		

Same methods

TextDocument::GetLineText ( int line, bool includeDelimiter ) : string

Usage Example

Example #1
0
        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);
        }
All Usage Examples Of Mono.TextEditor.TextDocument::GetLineText
TextDocument