Skip to content

Replace

[Source]

primitive val Replace

Constructors

create

[Source]

new val create()
: Replace val^

Returns


Public Functions

all

[Source]

Replace every non-overlapping occurrence of needle in s with replacement. Returns the result as String iso^. Returns the input cloned when needle is empty (semantically a no-op).

fun box all(
  s: String box,
  needle: String box,
  replacement: String box)
: (String iso^ | InvalidUtf8 val)

Parameters

Returns


first

[Source]

Replace only the first occurrence of needle. Empty needle yields the input cloned.

fun box first(
  s: String box,
  needle: String box,
  replacement: String box)
: (String iso^ | InvalidUtf8 val)

Parameters

Returns


eq

[Source]

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

Parameters

Returns


ne

[Source]

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

Parameters

Returns