contains
Проверяет, содержит ли строка подстроку.
contains
Сигнатура
typescript
function contains(str: string, substring: string, ignoreCase: boolean = false): booleanПримеры
typescript
import { contains } from 'strio'
contains('hello world', 'world')
// true
contains('Hello World', 'world', false)
// trueСвязанные функции
- containsAll - Содержит все подстроки
- containsAny - Содержит любую из подстрок