Class AsciiNumeric.

Inherits Collation

Implements the "i;ascii-numeric" collation from RFC 4790.

The "i;ascii-numeric" collation is a simple collation intended for use with arbitrarily-sized, unsigned decimal integer numbers stored as octet strings. US-ASCII digits (0x30 to 0x39) represent digits of the numbers. Before converting from string to integer, the input string is truncated at the first non-digit character. All input is valid; strings that do not start with a digit represent positive infinity.

int AsciiNumeric::compare( const UString & a, const UString & b ) const

Returns -1, 0, or 1 if a is smaller than, equal to, or greater than b, respectively.

Reimplements Collation::compare().

bool AsciiNumeric::contains( const UString &, const UString & ) const

Returns false (this collation doesn't support substring operations).

Reimplements Collation::contains().

bool AsciiNumeric::equals( const UString & a, const UString & b ) const

Returns true if a is equal to b, and false otherwise.

Reimplements Collation::equals().

bool AsciiNumeric::valid( const UString & ) const

Returns true (all input strings are valid).

Reimplements Collation::valid().

This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.