The most efficient way to search for an array of strings in another string

后端 未结 8 2327
礼貌的吻别
礼貌的吻别 2021-02-12 15:12

I have a large arrray of strings that looks something like this: String temp[] = new String[200000].

I have another String, let\'s call it bigtext. What I ne

8条回答
  •  借酒劲吻你
    2021-02-12 16:14

    Use a search algorithm like Boyer-Moore. Google Boyer Moore, and it has lots of links which explain how it works. For instance, there is a Java example.

提交回复
热议问题