pop
The pop() function removes the last character from a string and returns a new string.
Interactive example
Syntax
typescript
function pop<
GenericInput extends string
>(
input: GenericInput
): Pop<GenericInput>Parameters
input: String from which to remove the last character.
Return value
A new string without its last character. Literal types are preserved when possible.
