[]
        
(Showing Draft Content)

C1.Win.C1Editor.C1TextRange.Trim

Trim Method

Trim()

Moves start and end pointers of the range to exclude leading and trailing white-space characters from the current range.

Declaration
public void Trim()
Examples

The code below sets new background color for all words in selection, excluding leading and trailing white spaces.

private void button1_Click(object sender, EventArgs e)
{
C1TextRange r = c1Editor1.Selection.Clone();
r.Trim();
r.ApplyStyle("background-color", "#999999", C1StyleType.Character);
}