Skip to content

@yantrix/functions v0.0.2Docs


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.