private static char[] toCharArray(final CharSequence characters) {
		requireNonNull(characters, "Characters");

		final char[] chars = new char[characters.length()];
		for (int i = chars.length; --i >= 0;) {
			chars[i] = characters.charAt(i);
		}

		return chars;
	}
Create a new (distinct) CharSeq from the given {@code characters}. The
given {@link CharSequence} is sorted and duplicate values are removed.

@param characters the characters.
@throws NullPointerException if the {@code characters} are {@code null}.
jenetics/src/main/java/io/jenetics/util/CharSeq.java