public string ValueGets the guaranteed non-empty underlying string.
Exceptions
InvalidOperationException- Thrown if default-initialized.
All Types / Ferrous.Results
public readonly struct NonEmptyString : IEquatable<NonEmptyString>, IComparable<NonEmptyString>
A zero-allocation wrapper guaranteeing a non-null, non-whitespace string.
public string ValueGets the guaranteed non-empty underlying string.
InvalidOperationExceptionpublic int LengthGets the length of the underlying string.
public static Option<NonEmptyString> TryCreate(string? value)Creates a NonEmptyString if value is non-null and not whitespace; otherwise Option<T>.None.
public bool Equals(NonEmptyString other)public override bool Equals(object? obj)public override int GetHashCode()public int CompareTo(NonEmptyString other)public override string ToString()