Skip to content

Sentences

[Source]

primitive val Sentences

Constructors

create

[Source]

new val create()
: Sentences val^

Returns


Public Functions

count

[Source]

Number of UAX #29 sentence segments in s. Sentences break at paragraph separators (SB4) and after end-of-sentence terminators like ., !, ? followed by appropriate trailing context (SB11). Default is NO break — single text run with no sentence terminators yields one segment.

fun box count(
  s: String box)
: (USize val | InvalidUtf8 val)

Parameters

Returns


ranges

[Source]

Iterator over byte ranges [start, end_exclusive) for each sentence segment.

fun box ranges(
  s: String box)
: (Iterator[(USize val , USize val)] ref | InvalidUtf8 val)

Parameters

Returns


iter

[Source]

Iterator yielding each sentence as a String val slice.

fun box iter(
  s: String val)
: (Iterator[String val] ref | InvalidUtf8 val)

Parameters

Returns


eq

[Source]

fun box eq(
  that: Sentences val)
: Bool val

Parameters

Returns


ne

[Source]

fun box ne(
  that: Sentences val)
: Bool val

Parameters

Returns