example/public/ueditor/third-party/SyntaxHighlighter/shCore.js
function eachLine(str, callback)
    {
        var lines = splitLines(str);

        for (var i = 0; i < lines.length; i++)
            lines[i] = callback(lines[i], i);

        // include \r to enable copy-paste on windows (ie8) without getting everything on one line
        return lines.join('\r\n');
    }
function eachLine(str, callback)
    {
        var lines = splitLines(str);

        for (var i = 0; i < lines.length; i++)
            lines[i] = callback(lines[i], i);

        // include \r to enable copy-paste on windows (ie8) without getting everything on one line
        return lines.join('\r\n');
    }
function eachLine ( str , callback ) { var lines = splitLines ( str ) ; for ( var i = 0 ; i < lines . length ; i ++ ) lines [ i ] = callback ( lines [ i ] , i ) ; // include \r to enable copy-paste on windows (ie8) without getting everything on one line return lines . join ( '\r\n' ) ; }
Executes a callback on each line and replaces each line with result from the callback.
@param {Object} str			Input string.
@param {Object} callback		Callback function taking one string argument and returning a string.
Executes a callback on each line and replaces each line with result from the callback .