string module

Maylang standard-library module.

import "string" as string;

Module note — words splits ASCII space, tab, carriage return and newline, dropping empty fields.

Functions

is_empty

may
pub fun is_empty(s: Str) -> Bool

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

repeat

may
pub fun repeat(s: Str, n: Int) -> Str

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

capitalize

may
pub fun capitalize(s: Str) -> Str

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

words

may
pub fun words(s: Str) -> List<Str>

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

lines

may
pub fun lines(s: Str) -> List<Str>

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

csv

may
pub fun csv(s: Str) -> List<Str>

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

reverse_str

may
pub fun reverse_str(s: Str) -> Str

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

pad_left

may
pub fun pad_left(s: Str, width: Int, ch: Str) -> Str

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

pad_right

may
pub fun pad_right(s: Str, width: Int, ch: Str) -> Str

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

starts_with_any

may
pub fun starts_with_any(s: Str, prefixes: List<Str>) -> Bool

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

count_occurrences

may
pub fun count_occurrences(s: Str, needle: Str) -> Int

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

truncate

may
pub fun truncate(s: Str, width: Int, ellipsis: Str) -> Str

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source