Skip to content

@yantrix/functions v0.5.2 • Docs


Yantrix API / @yantrix/functions / Transformers / substr

Function: substr() ​

ts
function substr(
   str, 
   start, 
   end?): string

Returns a substring of a string.

Parameters ​

• str: string

The string to extract the substring from.

• start: number

The starting index of the substring.

• end?: number

The ending index of the substring (optional).

Returns ​

string

The extracted substring.