number and string values can be separated by semicolon delimiter
174945
public List<Serializable> getValues(String text, String type) throws NumberFormatException {
        List<Serializable> list = new ArrayList<Serializable>();
        String[] values = text.split(DELIM);
        for (String v : values) {
            Serializable value;
            if (QueryParameter.INTEGER_VALUE.equals(type)) {
                value = Integer.parseInt(v);
            } else if (QueryParameter.BYTE_VALUE.equals(type)) {
                value = Byte.parseByte(v);
            } else if (QueryParameter.SHORT_VALUE.equals(type)) {
                value = Short.parseShort(v);
            } else if (QueryParameter.LONG_VALUE.equals(type)) {
                value = Long.parseLong(v);
            } else if (QueryParameter.FLOAT_VALUE.equals(type)) {
                value = Float.parseFloat(v);
            } else if (QueryParameter.DOUBLE_VALUE.equals(type)) {
                value = Double.parseDouble(v);
            } else if (QueryParameter.BIGDECIMAL_VALUE.equals(type)) {
                value = new BigDecimal(v);
            } else { // String
                value = v;
            }
            list.add(value);
        }
        
        return list;
    }
864890
private static int parseField(String field, Input s, Character delim, int minLen, int maxLen, boolean strict) {
    int startIndex = s.index;
    int result = parseInt(s);
    if (startIndex == s.index) throw new DateFormatException("missing value for field '" + field + "'", s.str, startIndex);
    if (strict) {
      int len = s.index - startIndex;
      if (len < minLen) throw new DateFormatException("field '" + field + "' must be at least " + minLen + " digits wide", s.str, startIndex);
      if (maxLen > 0 && len > maxLen) throw new DateFormatException("field '" + field + "' must be no more than " + minLen + " digits wide", s.str, startIndex);
    }
    if (delim != null) {
      if (s.index >= s.len) throw new DateFormatException("unexpected end of input", s.str, s.index);
      if (strict && s.getChar() != delim.charValue()) throw new DateFormatException("unexpected character, expected '" + delim + "'", s.str, s.index);
      s.index++;
    }
    return result;
  }
112530
def apnumber(value):
    """"""
    try:
        value = int(value)
    except (TypeError, ValueError):
        return value
    if not 0 < value < 10:
        return str(value)
    return (_('one'), _('two'), _('three'), _('four'), _('five'), _('six'),
            _('seven'), _('eight'), _('nine'))[value - 1]
954424
function strToNumber(value) {
    // Convert strings to numbers
    if (typeof value === 'string' && !isNaN(Number(value) - parseFloat(value))) {
        return Number(value);
    }
    if (typeof value !== 'number') {
        throw new Error(value + " is not a number");
    }
    return value;
}
1311459
def from_string(self, value):
        """"""
        # Remove optional []
        if value.startswith('[') and value.endswith(']'):
            text = value[1:-1].strip()
        else:
            text = value.strip()
        # Result is a list
        result = []
        # If value starts with '(' assume a list of pairs
        if text.startswith('('):
            tokens = text.split(',')
            if len(tokens) % 2 != 0:
                raise ValueError('not a valid list of pairs')
            pos = 0
            while (pos < len(tokens)):
                val1 = float(tokens[pos].strip()[1:].strip())
                val2 = float(tokens[pos + 1].strip()[:-1])
                result.append((val1, val2))
                pos += 2
        else:
            for val in text.split(','):
                result.append(float(val))
        # Ensure that the result contains at least two elements
        if len(result) < 2:
            raise ValueError('invalid number of elements in list: ' + str(len(result)))
        return result
823100
function () {

// Parse a number value.

            var number,
                string = '';

            if (ch === '-') {
                string = '-';
                next('-');
            }
            while (ch >= '0' && ch <= '9') {
                string += ch;
                next();
            }
            if (ch === '.') {
                string += '.';
                while (next() && ch >= '0' && ch <= '9') {
                    string += ch;
                }
            }
            if (ch === 'e' || ch === 'E') {
                string += ch;
                next();
                if (ch === '-' || ch === '+') {
                    string += ch;
                    next();
                }
                while (ch >= '0' && ch <= '9') {
                    string += ch;
                    next();
                }
            }
            number = +string;
            if (isNaN(number)) {
                error("Bad number");
            } else {
                return number;
            }
        }
985580
function getDelimitersFinalMeans(text, innerCode) {
    const codeStart = text.indexOf(innerCode)
    const codeEnd = codeStart + innerCode.length
    return [text.slice(0, codeStart), text.slice(codeEnd)]
}
806703
private static String caseFormatWithDelimiter(String str, String delimiter, boolean isAllUpper, boolean isAllLower) {
		StringBuilder builder = new StringBuilder(str.length());
		String[] tokens = NOT_ALPHANUMERIC_REGEX.split(str);
		boolean shouldAddDelimiter = StringUtils.isNotEmpty(delimiter);
		for (int i = 0; i < tokens.length; i++) {
			String currentToken = tokens[i];
			builder.append(currentToken);
			boolean hasNextToken = i + 1 != tokens.length;
			if (hasNextToken && shouldAddDelimiter) {
				builder.append(delimiter);
			}
		}
		String outputString = builder.toString();
		if (isAllLower) {
			return StringUtils.lowerCase(outputString);
		} else if (isAllUpper) {
			return StringUtils.upperCase(outputString);
		}
		return outputString;
	}
1237676
def splitValues(textStr):
    
    vals = textStr.split(",")
    nums = []
    for v in vals:
        nums.append(float(v))
    return nums
934675
def parse_mixed_delim_str(line):
    """"""
    arrs = [[], [], []]
    for group in line.split(' '):
        for col, coord in enumerate(group.split('/')):
            if coord:
                arrs[col].append(int(coord))

    return [tuple(arr) for arr in arrs]
722218
function splitDecimal(numStr) {
  var allowNegative = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  var hasNagation = numStr[0] === '-';
  var addNegation = hasNagation && allowNegative;
  numStr = numStr.replace('-', '');
  var parts = numStr.split('.');
  var beforeDecimal = parts[0];
  var afterDecimal = parts[1] || '';
  return {
    beforeDecimal: beforeDecimal,
    afterDecimal: afterDecimal,
    hasNagation: hasNagation,
    addNegation: addNegation
  };
}
548770
def _to_number(cls, string):
        """"""
        try:
            if float(string) - int(string) == 0:
                return int(string)
            return float(string)
        except ValueError:
            try:
                return float(string)
            except ValueError:
                return string
949295
function(scalar, delimiters, stringDelimiters, i, evaluate)
	{
		if ( delimiters == undefined ) delimiters = null;
		if ( stringDelimiters == undefined ) stringDelimiters = ['"', "'"];
		if ( i == undefined ) i = 0;
		if ( evaluate == undefined ) evaluate = true;
		
		var output = null;
		var pos = null;
		var matches = null;
		
		if ( this.inArray(scalar[i], stringDelimiters) )
		{
			// quoted scalar
			output = this.parseQuotedScalar(scalar, i);
			i = this.i;
			if (null !== delimiters) {
				var tmp = scalar.substr(i).replace(/^\s+/, '');
				if (!this.inArray(tmp.charAt(0), delimiters)) {
					throw new YamlParseException('Unexpected characters ('+scalar.substr(i)+').');
				}
			}
		}
		else
		{
			// "normal" string
			if ( !delimiters )
			{
				output = (scalar+'').substring(i);
				
				i += output.length;

				// remove comments
				pos = output.indexOf(' #');
				if ( pos != -1 )
				{
					output = output.substr(0, pos).replace(/\s+$/g,'');
				}
			}
			else if ( matches = new RegExp('^(.+?)('+delimiters.join('|')+')').exec((scalar+'').substring(i)) )
			{
				output = matches[1];
				i += output.length;
			}
			else
			{
				throw new YamlParseException('Malformed inline YAML string ('+scalar+').');
			}
			output = evaluate ? this.evaluateScalar(output) : output;
		}

		this.i = i;
		
		return output;
	}
982934
def _separators(strings, linewidth):
    """"""
    if len(strings) <= 1:
        return ()

    indent_len = 4
    separators = []
    cur_line_len = indent_len + len(strings[0]) + 1
    if cur_line_len + 2 <= linewidth and '\n' not in strings[0]:
        # Next string might fit on same line
        separators.append(', ')
        cur_line_len += 1  # for the extra space
    else:
        # Use linebreak if string contains newline or doesn't fit
        separators.append(',\n')
        cur_line_len = indent_len

    for i, s in enumerate(strings[1:-1]):
        cur_line_len += len(s) + 1

        if '\n' in s:
            # Use linebreak before and after if string contains newline
            separators[i] = ',\n'
            cur_line_len = indent_len
            separators.append(',\n')

        elif cur_line_len + 2 <= linewidth:
            # This string fits, next one might also fit on same line
            separators.append(', ')
            cur_line_len += 1  # for the extra space

        elif cur_line_len <= linewidth:
            # This string fits, but next one won't
            separators.append(',\n')
            cur_line_len = indent_len

        else:
            # This string doesn't fit but has no newlines in it
            separators[i] = ',\n'
            cur_line_len = indent_len + len(s) + 1

            # Need to determine again what should come next
            if cur_line_len + 2 <= linewidth:
                # Next string might fit on same line
                separators.append(', ')
            else:
                separators.append(',\n')

    cur_line_len += len(strings[-1])
    if cur_line_len + 1 > linewidth or '\n' in strings[-1]:
        # This string and a comma don't fit on this line
        separators[-1] = ',\n'

    return tuple(separators)
90301
function(str, num) {
    if (isUndefined(num)) num = 1;
    var start = str.length - num < 0 ? 0 : str.length - num;
    return str.substr(start);
  }
786034
public static String substringAfter(String value, char delim) {
        int pos = value.indexOf(delim);
        if (pos >= 0) {
            return value.substring(pos + 1);
        }
        return null;
    }
519609
def join_and(value):
    
    # convert numbers to strings
    value = [str(item) for item in value]

    if len(value) == 1:
        return value[0]
    if len(value) == 2:
        return "%s and %s" % (value[0], value[1])

    # join all but the last element
    all_but_last = ", ".join(value[:-1])
    return "%s and %s" % (all_but_last, value[-1])