src/vs/base/common/strings.ts/getCharContainingOffset
export function getCharContainingOffset(str: string, offset: number): [number, number] {
	if (offset > 0 && isLowSurrogate(str.charCodeAt(offset))) {
		offset--;
	}
	const endOffset = offset + nextCharLength(str, offset);
	const startOffset = endOffset - prevCharLength(str, endOffset);
	return [startOffset, endOffset];
}