function _fnApplyColumnDefs(oSettings, aoColDefs, aoCols, headerLayout, fn) {
		var i, iLen, j, jLen, k, kLen, def;
		var columns = oSettings.aoColumns;

		if (aoCols) {
			for (i = 0, iLen = aoCols.length; i < iLen; i++) {
				if (aoCols[i] && aoCols[i].name) {
					columns[i].sName = aoCols[i].name;
				}
			}
		}

		// Column definitions with aTargets
		if (aoColDefs) {
			/* Loop over the definitions array - loop in reverse so first instance has priority */
			for (i = aoColDefs.length - 1; i >= 0; i--) {
				def = aoColDefs[i];

				/* Each definition can target multiple columns, as it is an array */
				var aTargets = def.target !== undefined
					? def.target
					: def.targets !== undefined
						? def.targets
						: def.aTargets;

				if (!Array.isArray(aTargets)) {
					aTargets = [aTargets];
				}

				for (j = 0, jLen = aTargets.length; j < jLen; j++) {
					var target = aTargets[j];

					if (typeof target === 'number' && target >= 0) {
						/* Add columns that we don't yet know about */
						while (columns.length <= target) {
							_fnAddColumn(oSettings);
						}

						/* Integer, basic index */
						fn(target, def);
					}
					else if (typeof target === 'number' && target < 0) {
						/* Negative integer, right to left column counting */
						fn(columns.length + target, def);
					}
					else if (typeof target === 'string') {
						for (k = 0, kLen = columns.length; k < kLen; k++) {
							if (target === '_all') {
								// Apply to all columns
								fn(k, def);
							}
							else if (target.indexOf(':name') !== -1) {
								// Column selector
								if (columns[k].sName === target.replace(':name', '')) {
									fn(k, def);
								}
							}
							else {
								// Cell selector
								headerLayout.forEach(function (row) {
									var cell = $(row[k].cell);

									// Legacy support. Note that it means that we don't support
									// an element name selector only, since they are treated as
									// class names for 1.x compat.
									if (target.match(/^[a-z][\w-]*$/i)) {
										target = '.' + target;
									}

									if (cell.is(target)) {
										fn(k, def);
									}
								});
							}
						}
					}
				}
			}
		}

		// Statically defined columns array
		if (aoCols) {
			for (i = 0, iLen = aoCols.length; i < iLen; i++) {
				fn(i, aoCols[i]);
			}
		}
	}
Take the column definitions and static columns arrays and calculate how
they relate to column indexes. The callback function will then apply the
definition found for a column to a suitable configuration object.
 @param {object} oSettings dataTables settings object
 @param {array} aoColDefs The aoColumnDefs array that is to be applied
 @param {array} aoCols The aoColumns array that defines columns individually
 @param {array} headerLayout Layout for header as it was loaded
 @param {function} fn Callback function - takes two parameters, the calculated
   column index and the definition for that column.
 @memberof DataTable#oApi