Skip to content

std-string

string helpers (thin, total wrappers over JS string ops).

Functions

trim

function trim(s: string): string

Remove leading and trailing whitespace.

lower

function lower(s: string): string

upper

function upper(s: string): string

split

function split(s: string, sep: string): string[]

join

function join(parts: string[], sep: string): string

includes

function includes(s: string, needle: string): boolean

startsWith

function startsWith(s: string, prefix: string): boolean

endsWith

function endsWith(s: string, suffix: string): boolean

replace

function replace(s: string, target: string, replacement: string): string
Documentation