MCPcopy Create free account
hub / github.com/blockstrap/framework / _fnGetMaxLenString

Function _fnGetMaxLenString

blockstrap/js/dependencies/tables.js:4177–4192  ·  view source on GitHub ↗

* Get the maximum strlen for each data column * @param {object} settings dataTables settings object * @param {int} colIdx column of interest * @returns {string} max string length for each column * @memberof DataTable#oApi

( settings, colIdx )

Source from the content-addressed store, hash-verified

4175 * @memberof DataTable#oApi
4176 */
4177 function _fnGetMaxLenString( settings, colIdx )
4178 {
4179 var s, max=-1, maxIdx = -1;
4180
4181 for ( var i=0, ien=settings.aoData.length ; i<ien ; i++ ) {
4182 s = _fnGetCellData( settings, i, colIdx, 'display' )+'';
4183 s = s.replace( __re_html_remove, '' );
4184
4185 if ( s.length > max ) {
4186 max = s.length;
4187 maxIdx = i;
4188 }
4189 }
4190
4191 return maxIdx;
4192 }
4193
4194
4195 /**

Callers 1

_fnGetWidestNodeFunction · 0.85

Calls 1

_fnGetCellDataFunction · 0.85

Tested by

no test coverage detected