A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://dotnet.github.io/dotNext/api/DotNext.CharComparer.html below:

Class CharComparer | .NEXT

Class CharComparer

Represents a character comparison operation that uses specific case and culture-based or ordinal comparison rules.

Namespace: DotNext Assembly: DotNext.dll Syntax
public abstract class CharComparer : IEqualityComparer<char>, IComparer<char>
Constructors | Edit this page View Source CharComparer()

Initializes a new instance of comparer.

Declaration Methods | Edit this page View Source Compare(char, char)

Compares two characters and returns an indication of their relative sort order.

Declaration
public abstract int Compare(char x, char y)
Parameters Type Name Description char x

The first character to compare.

char y

The second character to compare.

Returns Type Description int

A number indicating relative sort order of the characters.

| Edit this page View Source Compare(char, char, StringComparison)

Compares two characters and returns an indication of their relative sort order.

Declaration
public static int Compare(char x, char y, StringComparison comparisonType)
Parameters Type Name Description char x

The first character to compare.

char y

The second character to compare.

StringComparison comparisonType

The comparison type.

Returns Type Description int

A number indicating relative sort order of the characters.

| Edit this page View Source Create(CultureInfo, CompareOptions)

Creates character comparer for the specified culture.

Declaration
public static CharComparer Create(CultureInfo culture, CompareOptions options)
Parameters Type Name Description CultureInfo culture

A culture whose linguistic rules are used to perform a string comparison.

CompareOptions options

Comparison options.

Returns Exceptions | Edit this page View Source Equals(char, char)

Determines whether the two characters are equal.

Declaration
public abstract bool Equals(char x, char y)
Parameters Type Name Description char x

The first character to compare.

char y

The second character to compare.

Returns Type Description bool

true if both characters are equal; otherwise, false.

| Edit this page View Source Equals(char, char, StringComparison)

Determines whether the two characters are equal.

Declaration
public static bool Equals(char x, char y, StringComparison comparisonType)
Parameters Type Name Description char x

The first character to compare.

char y

The second character to compare.

StringComparison comparisonType

The comparison type.

Returns Type Description bool

true if both characters are equal; otherwise, false.

| Edit this page View Source FromComparison(StringComparison)

Converts StringComparison to CharComparer.

Declaration
public static CharComparer FromComparison(StringComparison comparison)
Parameters Type Name Description StringComparison comparison

A character comparer instance to convert.

Returns Type Description CharComparer

A comparer representing the specified comparison type.

Exceptions | Edit this page View Source GetHashCode(char)

Gets the hash code for the specified character.

Declaration
public abstract int GetHashCode(char ch)
Parameters Type Name Description char ch

A character.

Returns Type Description int

A hash code of the character.

| Edit this page View Source GetHashCode(char, StringComparison)

Gets the hash code for the specified character.

Declaration
public static int GetHashCode(char ch, StringComparison comparisonType)
Parameters Returns Type Description int

A hash code of the character.

Implements Extension Methods See Also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4