Class TextSpan

Hierarchy

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(start: number, length: number): TextSpan

Parameters

  • start: number
  • length: number

Returns

TextSpan

Properties

private _length: any

private _start: any

Methods

public containsPosition(position: number): boolean

Parameters

  • position: number

Returns

boolean

public containsTextSpan(span: TextSpan): boolean

Parameters

Returns

boolean

public end(): number

Returns

number

public static fromBounds(start: number, end: number): TextSpan

Parameters

  • start: number
  • end: number

Returns

TextSpan

public intersection(span: TextSpan): TextSpan

Parameters

Returns

TextSpan

public intersectsWith(start: number, length: number): boolean

Parameters

  • start: number
  • length: number

Returns

boolean

public intersectsWithPosition(position: number): boolean

Parameters

  • position: number

Returns

boolean

public intersectsWithTextSpan(span: TextSpan): boolean

Parameters

Returns

boolean

public isEmpty(): boolean

Returns

boolean

public length(): number

Returns

number

public overlap(span: TextSpan): TextSpan

Parameters

Returns

TextSpan

public overlapsWith(span: TextSpan): boolean

Parameters

Returns

boolean

public start(): number

Returns

number