node-lib

@wtasnorg/node-lib


@wtasnorg/node-lib / cloneString

Function: cloneString()

cloneString(s): string

Defined in: src/strings.ts:132

Clone returns a string with the same contents as s.

Parameters

s

string

Input string.

Returns

string

A string with the same contents as s.

Example

clone("hello"); // "hello"
clone("");      // ""