Tracks how many times tab was pressed
based on whether the UI changed.

@param {String} str
@return {String} result
@api private
163872
function handleTabCounts(str, freezeTabs) {
  var result;
  if (_.isArray(str)) {
    this._tabCtr += 1;
    if (this._tabCtr > 1) {
      result = str.length === 0 ? undefined : str;
    }
  } else {
    this._tabCtr = freezeTabs === true ? this._tabCtr + 1 : 0;
    result = str;
  }
  return result;
}
1052651
public static long tick(String str, PrintStream stream) {
    long elapsed = tick();
    stream.println(str + " Time elapsed: " + (elapsed) + " ms");
    return elapsed;
  }
847843
static private boolean hasOddNumberOfSingleQuotes(String str) {
        boolean result = false;
        for (int index = str.indexOf("'"); index > -1; index = str.indexOf("'", index+1)) {
            result = !result;
        }
        return result;
    }
499354
function log(str) {
  if (typeof document !== 'undefined') {
    console.log(str)
    const el = document.getElementById('perf')
    el.innerHTML += str
  }
}
949402
function(str, times) {
        if (String.prototype.repeat) return str.repeat(times);
        return Array.apply(null, new Array(times)).map(function() {
          return str;
        }).join('');
      }
1201093
function(str) {
    var tag = /#([a-z]+)\{|\}/,
        cstack = [],
        matches = null,
        orig = null,
        name = null,
        code = null;

    while (tag.test(str)) {
        matches = tag.exec(str);
        orig = matches[0];

        if (console.isColored()) {
            if (orig === '}') {
                cstack.pop();
            } else {
                name = matches[1];
                if (name in _ANSICODES) {
                    code = _ANSICODES[name];
                    cstack.push(code);
                }
            }

            str = str.replace(orig, _ANSICODES.reset + cstack.join(''));
        } else {
            str = str.replace(orig, '');
        }
    }
    return str;
}
336296
function Str(v){
	this._traversed = false;
	this._expression = true;
	this._cache = null;
	this._value = v;
	// should grab the actual value immediately?
}
146693
function($str)
    {
        if (!this.hasFormatOptions)
        {
            this.addToLog($str);
            return false;
        }

        // strip colors from the string. this is ok with multilines
        if (this.options.stripColor)
        {
            $str = Utils.stripColor($str);
        }

        var $result = [];
        if (this.options.splitOnLinebreak)
        {
            var $split = Utils.splitOnLinebreak($str,
                                                this.options.trimLinebreak);

            for (var $i = 0, $iL = $split.length; $i < $iL; $i++)
            {
                $str = $split[$i];
                if (this.options.trimTimestamp)
                {
                    $str = Utils.trimTimestamp($str, !this.options.stripColor);
                }

                this.addToLog($str);
                $result.push($str);
            }
        }
        else
        {
            if (this.options.trimTimestamp)
            {
                $str = Utils.trimTimestamp($str, !this.options.stripColor);
            }

            if (this.options.trimLinebreak)
            {
                $str = Utils.trimLinebreak($str);
            }

            this.addToLog($str);
            $result.push($str);
        }

        return $result;
    }
67099
function(str){
    if(_.isUndefined(str))
        str = '00';
    
    return String(str).length % 2 ? '0' + String(str) : String(str);
}
435504
public int indexOf(String str) {
        int i;

        for (i = 0; i < size; i++) {
            if (data[i].equals(str)) {
                return i;
            }
        }
        return -1;
    }
97211
function visualPad(str, num) {
  var needed = num - str.replace(remove_colors_re, '').length;

  return needed > 0 ? str + ' '.repeat(needed) : str;
}
915703
function(string) {
		var hit = null,
			looks = false;
		if (gui.Type.isString(string)) {
			hit = this.extractKey(string);
			looks = hit && hit[0] === string;
		}
		return looks;
	}
371982
def repeat_str(state):
    """"""
    if state == const.REPEAT_STATE_OFF:
        return 'Off'
    if state == const.REPEAT_STATE_TRACK:
        return 'Track'
    if state == const.REPEAT_STATE_ALL:
        return 'All'
    return 'Unsupported'
226967
function(attr) {
      if (attr == null) return !!Object.keys(this.changed).length;
      return _.has(this.changed, attr);
    }
801781
public static int countOccurTimes(String str, String a) {
		int pos = -2;
		int n = 0;

		while (pos != -1) {
			if (pos == -2) {
				pos = -1;
			}
			pos = str.indexOf(a, pos + 1);
			if (pos != -1) {
				n++;
			}
		}
		return n;
	}
985838
function tabbing(script) {
	var prev, data;
	script = script[0];
	if ((prev = script.prev) && (data = prev.data)) {
		return data.replace(/\n/g, '');
	}
	return '';
}
101867
public static int lastIndexOfIgnoreCase(String str, String searchStr) {
		if (searchStr.isEmpty() || str.isEmpty())
			return -1;
		return str.toLowerCase().lastIndexOf(searchStr.toLowerCase());
	}