我有这个字符串数组:
array = [ "nike air", "nike steam","nike softy" ,"nike strength",
"smooth sleeper","adidas air","addidas jogar","adidas softy","adidas heels"]
我想从中提取字符串作为类似 SQL 的查询。
例如,如果用户输入单词“nike”。然后应该返回 4 个字符串作为结果
"nike air", "nike steam","nike softy" ,"nike strength"
例如,如果用户输入单词“adidas”。然后应该返回 4 个字符串作为结果
"adidas air","addidas jogar","adidas softy","adidas heels"
可能吗?