Jaa


TextBuffer.numLines Method

Definition

Retrieves the number of lines in the TextBuffer object.

public:
 virtual int numLines();
public virtual int numLines ();
abstract member numLines : unit -> int
override this.numLines : unit -> int
Public Overridable Function numLines () As Integer

Returns

The number of lines in the content.

Remarks

Lines are separated by newlines ('\n').

The following example demonstrates the numLines method.

{ 
    TextBuffer txtb = new TextBuffer(); 
    if (txtb.fromClipboard()) 
    { 
        print "Clipboard contains ",txtb.numLines()," lines."; 
    } 
}

Applies to