Make a task name
@param {...string} str - Parts of the task name that will be joined together
@returns {string} - The full task name
483189
function taskNameFunc() {
    var validParts = _.dropWhile(_.flatten([this.prefix,arguments]),function(item) {
      return !item;
    });
    return validParts.join(this.separator);
  }
158397
function(str) {
    var T = this, k, child, ret = [];
    if (str === undefined) {
      str = "";
    }
    if (T === undefined) {
      return [];
    }
    if (T.words > 0) {
      ret.push(str);
    }
    for (k in T.children) {
      if (T.children.hasOwnProperty(k)) {
        child = T.children[k];
        ret = ret.concat(child.getAllWords(str + k));
      }
    }
    return ret;
  }
638905
public static String toUpperCaseWithUnderscore(final String str) {
        if (N.isNullOrEmpty(str)) {
            return str;
        }

        String result = upperCaseWithUnderscorePropNamePool.get(str);

        if (result == null) {
            result = StringUtil.toUpperCaseWithUnderscore(str);
            upperCaseWithUnderscorePropNamePool.put(str, result);
        }

        return result;
    }
676531
function (str) {
        var arr = str.split('.');
        var obj = root[arr.shift()];

        while (arr.length && obj) {
            obj = obj[arr.shift()];
        }
        return obj;
    }
1203726
private static String make(final CharSequence name,
        final CharSequence value, final CharSequence... attrs) {
        final StringBuilder text = new StringBuilder(
            String.format("%s=%s;", name, value)
        );
        for (final CharSequence attr : attrs) {
            text.append(attr).append(';');
        }
        return text.toString();
    }
428447
function(str, debug, error) {
  var pre = '[' + new Date().toISOString() + '] ';
  //pre += (my.name ? '{' + my.name.toUpperCase() + '} ' : '');
  pre += (debug ? 'DEBUG: ' : '');
  str.toString().split('\n').forEach(function(line) {
    if(error)
      console.error(pre + line)
    else if(debug)
      console.log(pre + line);
    else 
      console.log(pre + line);
  });
}
976710
function _link_comp(str1, str2){

	// Decompose links and arguments.
	var tmp1 = str1.split('?');
	var head1 = '';
	var args1 = [];
	if( ! tmp1[1] ){ // nothing before '?'
	    args1 = tmp1[0].split('&');
	}else{ // normal structure
	    head1 = tmp1[0];
	    args1 = tmp1[1].split('&');
	}
	var sorted_args1 = args1.sort();

	var tmp2 = str2.split('?');
	var head2 = '';
	var args2 = [];
	if( ! tmp2[1] ){ // nothing before '?'
	    args2 = tmp2[0].split('&');
	}else{ // normal structure
	    head2 = tmp2[0];
	    args2 = tmp2[1].split('&');
	}
	var sorted_args2 = args2.sort();

	// var tmp2 = str2.split('?');
	// var head2 = tmp2[0];
	// var args2 = tmp2[1].split('&');
	// var sorted_args2 = args2.sort();

	// Compare heads and arguments.
	var retval = false;
	if( head1 == head2 &&
	    _same_array(sorted_args1, sorted_args2) ){
	    retval = true;
	}
	return retval;
    }
363177
function padString(str, len) {
  return str.split().concat(new Array(len-str.length)).join(' ');
}
982658
def get_task_param_string(task):
    
    # get dict str -> str from luigi
    param_dict = task.to_str_params()

    # sort keys, serialize
    items = []
    for key in sorted(param_dict.keys()):
        items.append("'{:s}': '{:s}'".format(key, param_dict[key]))

    return "{" + ", ".join(items) + "}"
1019137
public static JVMId forName(String str) 
    throws IllegalArgumentException {
    if(str == null)
      return null;
    try {
      String[] parts = str.split("_");
      if(parts.length == 5) {
        if(parts[0].equals(JVM)) {
          boolean isMap = false;
          if(parts[3].equals("m")) isMap = true;
          else if(parts[3].equals("r")) isMap = false;
          else throw new Exception();
          return new JVMId(parts[1], Integer.parseInt(parts[2]),
              isMap, Integer.parseInt(parts[4]));
        }
      }
    }catch (Exception ex) {//fall below
    }
    throw new IllegalArgumentException("TaskId string : " + str 
        + " is not properly formed");
  }
496886
function(str, start) {
    return (str.length >= start.length &&
            str.substr(0, start.length) === start);
  }
77359
function stringTrim (str) {
  return str && str.trim ? str.trim() : stringTrimRight(stringTrimLeft(str))
}
2852
function str(input) {
  if (!is('String', input)) return;
  return root[input] || (root.require || require)(input);
}
801568
function indent(str, indent) {
            if (typeof indent === 'number') {
                var indent_str = '';
                while (indent_str.length < indent) indent_str += ' ';
                indent = indent_str;
            }
            var lines = str.split(/\n/);
            for (var i=0; i<lines.length; i++) {
                if (lines[i].trim() !== '')
                    lines[i] = indent + lines[i];
            }
            return lines.join("\n");            
        }
1334289
function(str) {
  var obj = {};
  var pairs = str.split(';');
  for (var i = 0; pairs.length > i; i++) {
    var kvs = pairs[i].trim().split('=');
    obj[kvs[0]] = kvs[1];
  }
  return obj;
}
1241883
private static QName convertString(String str) {
        if (str != null) {
            return QName.valueOf(str);
        } else {
            return null;
        }
    }
1301553
function dbName(str) {
  if (!str) return str;
  str = str.replace(/[A-Z]/g, $0 => `_${$0.toLowerCase()}`);
  if (str[0] === '_') return str.slice(1);
  return str;
}