Inside string
Check if a string is inside another string but not on the edge.
Install
npm install inside-string
Usage
const insideString = ; ;//=> false ;//=> true ;//=> false ; // Setting edge to 2//=> true ; // Setting left edge to 2 and right edge to 1//=> true
API
insideString(string, stringToCheck, sides?)
string
Type: string
The string to search.
stringToCheck
Type: string
The string to check for.
sides
Type: number
Default: 1
The amount of characters inwards from the left and right edges of the string to search.
insideString(string, stringToCheck, leftSide?, rightSide?)
string
Type: string
The string to search.
stringToCheck
Type: string
The string to check for.
leftSide
Type: number
Default: 1
The amount of characters inward from the left edge of the string to search.
rightSide
Type: number
Default: leftSide
The amount of characters inward from the right edge of the string to search.