Home > harper.js > Span

Span class

A struct that represents two character indices in a string: a start and an end.

Signature:

export declare class Span 

Properties

Property

Modifiers

Type

Description

end

number

start

number

Methods

Method

Modifiers

Description

free()

from_json(json)

static

is_empty()

len()

new(start, end)

static

to_json()