UniqueStyleString
A unique integer-based representation for common strings used in various style algorithms for faster comparison and reduced memory footprint.
Read time 1 minuteLast updated 13 days ago
Definition
public readonly struct UniqueStyleString : IEquatable<UniqueStyleString>
Ids may very between consecutive runs and may be regenerated on domain reload.
Static Fields
Value | Description |
|---|
| Empty | The UniqueStyleString representation of an empty string. |
| Null | The UniqueStyleString representation of a string. |
Constructors
Properties
Property | Description |
|---|
| id | An integer representing the underlying string uniquely. |
| IsEmpty | Returns whether this UniqueStyleString represents an empty string. |
| IsNull | Returns whether this UniqueStyleString represents a string. |
Methods
Method | Description |
|---|
| Equals | Computes whether or not this UniqueStyleString is identical another given object. |
| GetHashCode | Computes a valid hash code for this UniqueStyleString. |
| IsNullOrEmpty | Returns if this UniqueStyleString represents either a or empty string. |
| IsSame | Compares this UniqueStyleString to a given string for equality. |
| ToString | Returns a string value with the same content as the string that was used to obtain this UniqueStyleString. |
Static Methods
Method | Description |
|---|
| TryGet | Attempts to retrieve an existing UniqueStyleString from a string value. |
Operators
Operator | Description |
|---|
| operator == | Computes whether or not this UniqueStyleString is identical to the other given UniqueStyleString. |
| operator != | Computes whether or not this UniqueStyleString is different from the other given UniqueStyleString. |