string-contains-string
v1.0.0
Published
Check if one of two strings contains the other
Downloads
4
Readme
string-contains-string
Check if one of two strings contains the other
Install
npm install --save string-contains-string
Usage
import stringContainsString from 'string-contains-string'
stringContainsString('hello', 'world')
// => false
stringContainsString('hello', 'ell')
// => true
stringContainsString('ell', 'hello')
// => true
API
stringContainsString(str1, str2)
Returns a boolean
if str1
contains str2
or str2
contains str1
.
str1
type: string
A string to test.
str2
type: string
Another string to test.
LICENSE
MIT © Dustin Specker