calculateSelectionStart = function (oSelectionRange, sItemText, sTypedValue, bSkipTextSelection) {
		var bIsTextSelected = oSelectionRange && oSelectionRange.start !== oSelectionRange.end,
			bItemsTextStartsWithTypedValue = itemsTextStartsWithTypedValue(sItemText, sTypedValue),
			bShoulResetSelectionStart = !(bItemsTextStartsWithTypedValue && (bIsTextSelected || bSkipTextSelection));

		return bShoulResetSelectionStart ? 0 : oSelectionRange.start;
	}
Calculates the correct start of a text selection.

@param {object} oSelectionRange Start and end range.
@param {string} sItemText The item text property.
@param {string} sTypedValue The user input.
@param {boolean} bSkipTextSelection True, if the selection should be skipped.

@returns {int} The correct start position of a selection.