Skip to content

append

ts
function String.append(
    target: string,
    source: Iterable<string>,
): string

Appends source or strings from source iterable to the end of target string.

Example

ts
import { String } from "@monstermann/string";

String.append("hello", " world"); // "hello world"
String.append("hello", [" ", "world"]); // "hello world"
ts
import { String } from "@monstermann/string";

pipe("hello", String.append(" world")); // "hello world"
pipe("hello", String.append([" ", "world"])); // "hello world"