I need to determine if string B is in string A for a certain number of characters. In my case, these are 6 characters:
For example,
строка А: 3897856787 строка B: 7856787
If string B is in string A, it should return true; otherwise, false.
If a,
строка А: 3897856787 строка B: 87
In this case, it should return false, since the entry of only 2 characters.
I tried the includes method from lodash, but it returns true, even when 2 digits are entered.
Please tell me the solution!
if
does not fit? - Vitaliy Shebanitsstr.indexOf("подстрока")
- Vitaly Shebanits