*/
	public int compareTo(CharBuffer that) {
		int n = this.position() + Math.min(this.remaining(), that.remaining());
		for (int i = this.position(), j = that.position(); i < n; i++, j++) {
			char v1 = this.get(i);
			char v2 = that.get(j);
			if (v1 == v2)
				continue;
			if ((v1 != v1) && (v2 != v2)) // For float and double
				continue;
			if (v1 < v2)
				return -1;
			return +1;
		}
		return this.remaining() - that.remaining();
	}