def chars_to_ranges(s):
	char_list = list(s)
	char_list.sort()
	i = 0
	n = len(char_list)
	result = []
	while i < n:
		code1 = ord(char_list[i])
		code2 = code1 + 1
		i = i + 1
		while i < n and code2 >= ord(char_list[i]):
			code2 = code2 + 1
			i = i + 1
		result.append(code1)
		result.append(code2)
	return result
Return a list of character codes consisting of pairs
dataset/ETHPy150Open probcomp/bayeslite/external/plex/dist/Plex/Regexps.py/chars_to_ranges