selectSubString method
Selects the specified substring, just as if a user selected the substring interactively.
![]() ![]() |
Syntax
object.selectSubString(charnum, nchars)Parameters
- charnum [in]
-
Type: Integer
The index of the start character in the substring, where the first character has an index of 0.
- nchars [in]
-
Type: Integer
The number of characters in the substring. If the nchars parameter specifies more characters than are available, the substring consists of all characters starting with the charnum character until the end of the list of characters.
Return value
Type: HRESULT
This method can return one of these values.
| Return code | Description |
|---|---|
|
IE9 mode only. Index or size is negative, or greater than the allowed value. |
Exceptions
| Exception | Condition |
|---|---|
|
Index or size is negative, or greater than the allowed value. For versions earlier than Internet Explorer 10, INDEX_SIZE_ERR is returned. |
Standards information
- Scalable Vector Graphics: Text, Section 10.17.1
Remarks
The selectSubString method can raise a DOMException excpetion with the code INDEX_SIZE_ERR. This exception is raised if the charnum or nchars parameter is negative or if charnum is greater than or equal to the number of characters at this node.
See also

