Method XbpRtf():span() Foundation

Selects text in the XbpRtf object based on a set of characters specified.

Syntax
:span( <cCharacters>, [<bForward>], [<bExclude>] ) --> self
Parameters
<cCharacters>
A character string that specifies the characters to include in or exclude from the selection.
<bForward>
A logical value that specifies the direction the text is selected from. If .T. (TRUE) is passed in <bForward>, text is selected from the current insertion point or the beginning of the current selection towards the end of the document. If <bForward> contains .F. (FALSE), text is selected from the current insertion point or the beginning of the current selection towards the start of the document. The <bForward> parameter defaults to .T. (TRUE).
<bExclude>
Specifies whether the characters in <cCharacters> are excluded from the selection. If <bExclude> contains .T. (TRUE), the <cCharacters> parameter specifies characters not to be included in the selection. Instead, text is selected up to the first character found in <cCharacters>. If the value .F. (FALSE) is passed in <bExclude>, the selection stops at the first character that does not appear in <cCharacters>.
Return

This method returns the object executing the method (self).

Description

The method :span() is used to select text in the text buffer of an XbpRtf object. The current selection is modified based on a set of characters. :span() generally is used to select words and sentences within the document.

The method modifies the current selection so that it includes a certain set of characters. The characters to be included can be defined either explicitly or indirectly, by specifying the text that marks the end of the new selection area.

The comparison performed by :span() is case-sensitive. If no match is found for the character set specified in <cCharacters>, the current selection and cursor position remains unchanged.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.