syck_str_blow_away_commas
760759
public void strBlowAwayCommas() {
        Data.Str d = ((Data.Str)data);
        byte[] buf = d.ptr.buffer;
        int go = d.ptr.start;
        int end = go + d.len;
        for(;go < end;go++) {
            if(buf[go] == ',') {
                d.len--;
                end--;
                System.arraycopy(buf, go+1, buf, go, end-go);
            }
        }
    }
848690
function cutString(srcStr, length) {
      var tmpChar, tmpStr = '', count = 0, i = -1;
      while (++i < srcStr.length) {
        if (count >= length) break;
        tmpChar = srcStr.substr(i, 1);
        tmpStr += tmpChar;
        count += matchPattern(tmpChar, 'dbChar') ? 2 : 1;
      }
      return tmpStr + '...';
    }
299752
function commify(value) {
    var comps = String(value).split('.');
    if (comps.length > 2 || !comps[0].match(/^-?[0-9]*$/) || (comps[1] && !comps[1].match(/^[0-9]*$/)) || value === '.' || value === '-.') {
        errors.throwError('invalid value', errors.INVALID_ARGUMENT, { argument: 'value', value: value });
    }
    // Make sure we have at least one whole digit (0 if none)
    var whole = comps[0];
    var negative = '';
    if (whole.substring(0, 1) === '-') {
        negative = '-';
        whole = whole.substring(1);
    }
    // Make sure we have at least 1 whole digit with no leading zeros
    while (whole.substring(0, 1) === '0') {
        whole = whole.substring(1);
    }
    if (whole === '') {
        whole = '0';
    }
    var suffix = '';
    if (comps.length === 2) {
        suffix = '.' + (comps[1] || '0');
    }
    var formatted = [];
    while (whole.length) {
        if (whole.length <= 3) {
            formatted.unshift(whole);
            break;
        }
        else {
            var index = whole.length - 3;
            formatted.unshift(whole.substring(index));
            whole = whole.substring(0, index);
        }
    }
    return negative + formatted.join(',') + suffix;
}
1100591
def p_levelsigs_comma(self, p):
        ''
        p[0] = p[1] + (p[3],)
        p.set_lineno(0, p.lineno(1))
1352276
def shorten(str)
      cleared_str = clear_string(str, :encoding => 'ASCII').gsub(/\W/," ")
      cleared_str.split(" ").map {|s| s[0..1].capitalize}.join
    end
1222753
function unquote(str) {
		var ch = str.charAt(0);
		if (ch == '"' || ch == "'") {
			str = str.substr(1);
			var last = str.charAt(str.length - 1);
			if (last === ch) {
				str = str.substr(0, str.length - 1);
			}
		}

		return str;
	}
929708
function removeComments(str) {
  str = ('__' + str + '__').split('');
  var mode = {
    singleQuote: false,
    doubleQuote: false,
    regex: false,
    blockComment: false,
    lineComment: false,
    condComp: false
  };
  for (var i = 0, l = str.length; i < l; i++) {

    if (mode.regex) {
      if (str[i] === '/' && str[i - 1] !== '\\') {
        mode.regex = false;
      }
      continue;
    }

    if (mode.singleQuote) {
      if (str[i] === "'" && str[i - 1] !== '\\') {
        mode.singleQuote = false;
      }
      continue;
    }

    if (mode.doubleQuote) {
      if (str[i] === '"' && str[i - 1] !== '\\') {
        mode.doubleQuote = false;
      }
      continue;
    }

    if (mode.blockComment) {
      if (str[i] === '*' && str[i + 1] === '/') {
        str[i + 1] = '';
        mode.blockComment = false;
      }
      str[i] = '';
      continue;
    }

    if (mode.lineComment) {
      if (str[i + 1] === '\n' || str[i + 1] === '\r') {
        mode.lineComment = false;
      }
      str[i] = '';
      continue;
    }

    if (mode.condComp) {
      if (str[i - 2] === '@' && str[i - 1] === '*' && str[i] === '/') {
        mode.condComp = false;
      }
      continue;
    }

    mode.doubleQuote = str[i] === '"';
    mode.singleQuote = str[i] === "'";

    if (str[i] === '/') {

      if (str[i + 1] === '*' && str[i + 2] === '@') {
        mode.condComp = true;
        continue;
      }
      if (str[i + 1] === '*') {
        str[i] = '';
        mode.blockComment = true;
        continue;
      }
      if (str[i + 1] === '/') {
        str[i] = '';
        mode.lineComment = true;
        continue;
      }
      mode.regex = true;

    }

  }
  return str.join('').slice(2, - 2);
}
1336513
def truncate_between(str, after = 30)
      str = '' if str.nil?
      str.length > after ? "#{str[0..(after / 2) - 2]}...#{str[(str.length - ((after / 2) - 2))..str.length]}" : str
    end
1307575
function clear () {
  var str = '';
  for (var i = 0; i < 20; i++) {
    if (Math.random() < 0.5) {
      str += '\u200B';
    } else {
      str += ' ';
    }
  }
  return str;
}
193166
function removeAnchors(text) {
        if(text.charAt(0) == '\x02')
            text = text.substr(1);
        if(text.charAt(text.length - 1) == '\x03')
            text = text.substr(0, text.length - 1);
        return text;
    }
233822
function stringTrimRight (str) {
  return str && str.trimRight ? str.trimRight() : ('' + str).replace(/[\s\uFEFF\xA0]+$/g, '')
}
913312
def comma_choice_list(cls, string):
        ''''''
        items = string.split(',')
        items = CommaChoiceListArgs([item.strip() for item in items])
        return items
1129071
def split_comma_argument(comma_sep_str):
    """"""
    terms = []
    for term in comma_sep_str.split(','):
        if term:
            terms.append(term)
    return terms
100133
function(str, pos) {
    if (str.length == 0) {
      return;
    }

    var T = this, k, child;

    if (pos === undefined) {
      pos = 0;
    }
    if (T === undefined) {
      return;
    }
    if (pos === str.length) {
      T.words--;
      return;
    }
    T.prefixes--;
    k = str[pos];
    child = T.children[k];
    child.remove(str, pos + 1);
  }
356418
def truncate_str(str_, maxlen=110, truncmsg=' ~~~TRUNCATED~~~ '):
    
    if NO_TRUNCATE:
        return str_
    if maxlen is None or maxlen == -1 or len(str_) < maxlen:
        return str_
    else:
        maxlen_ = maxlen - len(truncmsg)
        lowerb  = int(maxlen_ * .8)
        upperb  = maxlen_ - lowerb
        tup = (str_[:lowerb], truncmsg, str_[-upperb:])
        return ''.join(tup)
888896
public static String trimComma(String s) {
        if (s.endsWith(",")) {
            s = s.substring(0, s.length() - 1);
        }
        return s;
    }
945894
def unpunctuate(s, *, char_blacklist=string.punctuation):
    
    # remove punctuation
    s = "".join(c for c in s if c not in char_blacklist)
    # remove consecutive spaces
    return " ".join(filter(None, s.split(" ")))