Google Web Toolkit (Beta)
Search this site:

# Interface Text

public interface Text
extends CharacterData
// Extended by `CDATASection`
This interface describes text nodes, as might occur between tags. These may also be `CDATASection` nodes.

## Methods

splitText(int) | Splits the node into two text nodes.

## Method Detail

### splitText

public Text splitText(int offset)
Splits the node into two text nodes. The current node is truncated to `offset`, and the new node is inserted as the next sibling. The new node created is also returned.

#### Parameters

offset
  how far from the beginning to start splitting

#### Return Value

new `Text` node containing the data after `offset`