MCPcopy Create free account
hub / github.com/daniel2005d/mapXplore / search_text_array

Method search_text_array

utils/utils.py:21–28  ·  view source on GitHub ↗
(text:str,list:list[str])

Source from the content-addressed store, hash-verified

19
20 @staticmethod
21 def search_text_array(text:str,list:list[str]):
22 matches = []
23 for index, item in enumerate(list):
24 match = re.findall(text, item, flags=re.IGNORECASE)
25 if len(match)>0:
26 matches.append({"index":index, "value": item})
27
28 return matches
29
30 @staticmethod
31 def format_number(value:object)->str:

Callers 1

_print_query_resultsMethod · 0.80

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected