Returns a set of characters equivalent to the given desimal separator used for
parsing number.  This method may return an empty set.
167714
private UnicodeSet getEquivalentDecimals(String decimal, boolean strictParse) {
        UnicodeSet equivSet = UnicodeSet.EMPTY;
        if (strictParse) {
            if (strictDotEquivalents.contains(decimal)) {
                equivSet = strictDotEquivalents;
            } else if (strictCommaEquivalents.contains(decimal)) {
                equivSet = strictCommaEquivalents;
            }
        } else {
            if (dotEquivalents.contains(decimal)) {
                equivSet = dotEquivalents;
            } else if (commaEquivalents.contains(decimal)) {
                equivSet = commaEquivalents;
            }
        }
        return equivSet;
    }
818581
public static int[] parse(String s) {
		ArrayList<Integer> n = new ArrayList<Integer>();
		int val = 0;
		boolean hasChar = false;
		int i;
		for (i = 0; i < s.length(); ++i) {
			char c = s.charAt(i);
			if (c >= '0' && c <= '9') {
				val = val * 10 + (c - '0');
				hasChar = true;
				continue;
			}
			if (c == '.') {
				n.add(Integer.valueOf(val));
				val = 0;
				hasChar = false;
				continue;
			}
			if (hasChar)
				n.add(Integer.valueOf(val));
			break;
		}
		if (i == s.length()) n.add(Integer.valueOf(val));
		int[] numbers = new int[n.size()];
		for (i = 0; i < n.size(); ++i)
			numbers[i] = n.get(i).intValue();
		return numbers;
	}
870229
def convert_dedent(self):
        """"""
        # Dedent means go back to last indentation
        if self.indent_amounts:
            self.indent_amounts.pop()

        # Change the token
        tokenum = INDENT

        # Get last indent amount
        last_indent = 0
        if self.indent_amounts:
            last_indent = self.indent_amounts[-1]

        # Make sure we don't have multiple indents in a row
        while self.result[-1][0] == INDENT:
            self.result.pop()

        value = self.indent_type * last_indent
        return tokenum, value
935516
public static String getDigitsFromHexLiteral(String paramString) {
        Matcher matcher = SingleQuotedHexLiteral.matcher(paramString);
        if (matcher.matches()) {
            return matcher.group(1);
        }
        return null;
    }
1279107
public Collection<String> split() {
        String s = ident;
        Set<String> result = new HashSet<>();

        while (s.length() > 0) {
            StringBuilder buf = new StringBuilder();

            char first = s.charAt(0);
            buf.append(first);
            int i = 1;

            if (s.length() > 1) {
                boolean camelWord;
                if (Character.isLowerCase(first)) {
                    camelWord = true;
                } else {
                    char next = s.charAt(i++);
                    buf.append(next);
                    camelWord = Character.isLowerCase(next);
                }

                while (i < s.length()) {
                    char c = s.charAt(i);
                    if (Character.isUpperCase(c)) {
                        if (camelWord) {
                            break;
                        }
                    } else if (!camelWord) {
                        break;
                    }
                    buf.append(c);
                    ++i;
                }

                if (!camelWord && i < s.length()) {
                    buf.deleteCharAt(buf.length() - 1);
                    --i;
                }
            }

            result.add(buf.toString().toLowerCase(Locale.US));
            s = s.substring(i);
        }

        return result;
    }
1004400
public String getSAXString(String separatorToken) {
    StringBuffer sb = new StringBuffer();
    ArrayList<Integer> index = new ArrayList<Integer>();
    index.addAll(this.realTSindex.keySet());
    Collections.sort(index, new Comparator<Integer>() {
      public int compare(Integer int1, Integer int2) {
        return int1.compareTo(int2);
      }
    });
    for (int i : index) {
      sb.append(this.realTSindex.get(i).getPayload()).append(separatorToken);
    }
    return sb.toString();
  }
82208
public String nextToken(String separators) {
        separator = 0;
        if (peek != null) {
            String tmp = peek;
            peek = null;
            return tmp;
        }

        if (index == string.length()) {
            return null;
        }

        StringBuilder sb = new StringBuilder();

        boolean hadstring = false; // means no further trimming
        boolean validspace = false; // means include spaces

        while (index < string.length()) {
            char c = string.charAt(index++);

            if (Character.isWhitespace(c)) {
                if (index == string.length()) {
                    break;
                }

                if (validspace) {
                    sb.append(c);
                }

                continue;
            }

            if (separators.indexOf(c) >= 0) {
                if (returnTokens) {
                    peek = Character.toString(c);
                } else {
                    separator = c;
                }
                break;
            }

            switch (c) {
                case '"':
                case '\'':
                    hadstring = true;
                    quotedString(sb, c);
                    // skip remaining space
                    validspace = false;
                    break;

                default:
                    sb.append(c);
                    validspace = true;
            }
        }
        String result = sb.toString();
        if (!hadstring) {
            result = result.trim();
        }

        if (result.length() == 0 && index == string.length()) {
            return null;
        }
        return result;
    }
952191
function splitValue(value, separator) {
    var separatorRegexp = new RegExp(separator);
    var escapedSeparatorRegexp = new RegExp('\\\\' + separator, 'g');
    // easiest way, replace it with really rare character sequence
    value = value.replace(escapedSeparatorRegexp, 'ΩΩΩ');
    if (value.match(separatorRegexp)) {
        value = value.split(separator);

        value = value.map(function (item) {
            return item.replace(/ΩΩΩ/g, separator);
        });
    } else {
        value = value.replace(/ΩΩΩ/g, separator);
    }
    return value;
}
1050241
public static List<String> parseName(String sourceName, char separator) {
		List<String> result = new ArrayList<String>();
		if (sourceName != null) {
			StringBuilder currentWord = new StringBuilder();
			boolean lastIsLower = false;
			for (int index = 0, length = sourceName.length(); index < length; ++index) {
				char curChar = sourceName.charAt(index);
				if (Character.isUpperCase(curChar) || (!lastIsLower && Character.isDigit(curChar)) || curChar == separator) {
					if (lastIsLower && currentWord.length() > 1 || curChar == separator && currentWord.length() > 0) {
						result.add(currentWord.toString());
						currentWord = new StringBuilder();
					}
					lastIsLower = false;
				} else {
					if (!lastIsLower) {
						int currentWordLength = currentWord.length();
						if (currentWordLength > 1) {
							char lastChar = currentWord.charAt(--currentWordLength);
							currentWord.setLength(currentWordLength);
							result.add(currentWord.toString());
							currentWord = new StringBuilder();
							currentWord.append(lastChar);
						}
					}
					lastIsLower = true;
				}

				if (curChar != separator) {
					currentWord.append(curChar);
				}
			}

			result.add(currentWord.toString());
		}
		return result;
	}
81247
public CALC setDecimalSeparator(char decimalSeparator) {
        getProperties().setInputDecimalSeparator(decimalSeparator);
        getProperties().setOutputDecimalSeparator(decimalSeparator);
        return getThis();
    }
383643
def number_with_delimiter(number, delimiter=",", separator=".")
      begin
        parts = number.to_s.split('.')
        parts[0].gsub!(/(\d)(?=(\d\d\d)+(?!\d))/, "\\1#{delimiter}")
        parts.join separator
      rescue
       number
      end
    end
142829
private String getCommaSeperatedIndexes(Set<String> data) {

        Iterator<String> it = data.iterator();
        String res = it.next();
        if (data.size() == 1) {
            return res;
        }
        res += ", ";
        while (it.hasNext()) {
            res += it.next() + ", ";
        }
        res = res.substring(0, res.length() - 2);
        return res;
    }
820829
public static int getDelimIndex(StringBuilder sb, int itemPos, char[] delims, boolean ignoreEmpty) {

	if (StringUtil.isEmpty(sb)) return -1;

	int curr = -1, listIndex = 0;
	int len = sb.length();
	for (int i = 0; i < len; i++) {
	    if (contains(delims, sb.charAt(i))) {
		curr = i;
		if (ignoreEmpty) {
		    if (i == 0 || (i + 1 < len && contains(delims, sb.charAt(i + 1)))) {
			sb.delete(curr, curr + 1);
			len--;
			i--;
			curr--;
			continue;
		    }
		}
		if (++listIndex == itemPos) break;
	    }
	}
	if (listIndex < itemPos) return len;
	return curr;
    }
826015
def toStr (self, separator = ':'):
        
        return separator.join(('{:02x}'.format(x) for x in self.__value))
377154
public static String toSeparatedString(List<?> values, String separator) {
    	return toSeparatedString(values, separator, null);
    }
467081
public static final Collection<String> getDescriptionFromAts(final String pAts) {
		Collection<String> ret = new ArrayList<String>();
		if (StringUtils.isNotBlank(pAts)) {
			String val = StringUtils.deleteWhitespace(pAts).replaceAll("9000$", "");
			for (String key : MAP.keySet()) {
				int j = val.length() - 1;
				int i = key.length() - 1;
				while (i >= 0) {
					if (key.charAt(i) == '.' || key.charAt(i) == val.charAt(j)  ){
						j--;
						i--;
						if (j < 0){
							if (!key.substring(key.length() - val.length(), key.length()).replace(".", "").isEmpty()){
								ret.addAll(MAP.get(key));
							}
							break;
						}
					} else if (j != val.length() - 1) {
						j = val.length() - 1;
					} else if (i == key.length() - 1){
						break;
					} else {
						i--;
					}
				}
			}
		}
		return ret;
	}
607704
def _getChar(self, char_spec):
        
        if len(char_spec) >= 4 and all(c in string.hexdigits for c in char_spec):
            char_number = int(char_spec, 16)
            if char_number not in range(0x110000):
                raise ValueError('No such character')
            return chr(char_number)
        elif len(char_spec) == 1:
            return char_spec
        else:
            raise ValueError('No such character')