UnicodeCodePoint

Namespace: SnowBank.Text · struct

Implements: IEquatable<UnicodeCodePoint>

Constructors

UnicodeCodePoint

UnicodeCodePoint(uint value)

Methods

ComputeHashCode

static int ComputeHashCode(string s)

Compute the hashcode of a string in memory

  • s — String in memory

Returns: Hashcode of the string

static int ComputeHashCode(string s, int offset, int count)

Compute the hashcode of a sub-section of a string in memory

  • s — String in memory
  • offset — Start of the substring
  • count — Length of the substring

Returns: Hashcode of the substring

ComputeHashCodeAscii

static int ComputeHashCodeAscii(ReadOnlySpan<byte> buffer)

Compute the hashcode of a buffer known to contain only ASCII characters

  • buffer — Buffer that contains ASCII bytes

Returns: Hashcode of the string

ComputeHashCodeUtf8

static int ComputeHashCodeUtf8(ReadOnlySpan<byte> buffer, int length)

Compute the hashcode of a buffer known to contain UTF-8 encoded code points

  • buffer — Buffer that contains UTF-8 bytes
  • length — Length (in characters) of the corresponding string

Returns: Hashcode of the string

Equals

bool Equals(UnicodeCodePoint other)

bool Equals(uint other)

bool Equals(char other)

bool Equals(object obj)

GetCategory

UnicodeCategory GetCategory()

Gets the Unicode category of this code point

GetHashCode

int GetHashCode()

IsSurrogate

static bool IsSurrogate(UnicodeCodePoint codePoint)

ToChar

char ToChar()

Gets the equivalent character for this code point

ToLower

UnicodeCodePoint ToLower()

Fields

Value

readonly uint Value