Check if a string contains an element from a list (of strings)

后端 未结 11 2064
盖世英雄少女心
盖世英雄少女心 2020-11-27 11:09

For the following block of code:

For I = 0 To listOfStrings.Count - 1
    If myString.Contains(lstOfStrings.Item(I)) Then
        Return True
    End If
Next         


        
11条回答
  •  Happy的楠姐
    2020-11-27 11:23

    Have you tested the speed?

    i.e. Have you created a sample set of data and profiled it? It may not be as bad as you think.

    This might also be something you could spawn off into a separate thread and give the illusion of speed!

提交回复
热议问题