add a comment to make clear that the string in stringIterator

does not change; only curIndex is increased. Newlines are counted
between curIndex and the end of string.
pull/2518/head
webzwo0i 2015-02-15 13:25:57 +01:00
parent c191a8716e
commit 4313bd27f8
1 changed files with 1 additions and 0 deletions

View File

@ -507,6 +507,7 @@ exports.opAssembler = function () {
*/ */
exports.stringIterator = function (str) { exports.stringIterator = function (str) {
var curIndex = 0; var curIndex = 0;
// newLines is the number of \n between curIndex and str.length
var newLines = str.split("\n").length - 1 var newLines = str.split("\n").length - 1
function getnewLines(){ function getnewLines(){
return newLines return newLines