Share via


TextBuffer.subStr Method

Retrieves part of the content of the TextBuffer object (a substring).

Syntax

public str subStr(int start, int length)

Run On

Called

Parameters

  • start
    Type: int
    The start position of the desired substring.
  • length
    Type: int
    The length of the desired substring.

Return Value

Type: str
A string that contains the specified part of the TextBuffer object content.

Remarks

When you specify the start position for substring, use 1 for the first character in the content, 2 for the second character, and so on.

Examples

{ 
    TextBuffer txtb = new TextBuffer(); 
    str mystr; 
    if (txtb.fromClipboard()) 
    { 
        mystr = txtb.subStr(10,15);  
        // 15 long substring starting at position 10. 
    } 
}

See Also

TextBuffer Class

subStr Function