I wanna find a string inside an array by some part of its name(at least more than 3characters), Like: Buffalo is an index of array and I want to search buf or buff, buffa, buffal or even the hole word(buffalo) and it return Buffalo. No matter if its case-sensitive or NOT
here is my array:
const carsName =
[
"Landstalker",
"Bravura",
"Buffalo",
"Linerunner",
"Perrenial",
"Sentinel",
"Dumper",
"Firetruck",
"Trashmaster",
"Stretch",
"Manana",
"Infernus"
]
I wrote it in PAWN once and I'm gonna write it in JS (for my Alt V server) but I'm stuck at this point, is it possible to do?
and at the end, sorry for my English
Case insensitive partial match: