from typing import List


def _find_in_enum_members(item: str, enum_members: List[str]) -> int:
	"""Matches a string in the provided list of member strings.
	The item must be not fully matched.
	The item is matched if a member string starts with the item (the item is a prefix of the member).
	Example: item='CONN' will match the enum_member 'CONNected'
	If the item contains a comma, only the value before comma is considered
	Returns found index in the enum_members list"""
	if ',' in item:
		item = item[:item.index(',')].strip()
	ix = -1
	i = 0
	for x in enum_members:
		if x.startswith(item):
			return i
		i += 1
	return ix