14 lines
455 B
C#
14 lines
455 B
C#
|
namespace SharpChat;
|
||
|
|
||
|
public readonly struct StringDiff(
|
||
|
string before,
|
||
|
string? after,
|
||
|
StringComparison comparisonType = StringComparison.Ordinal
|
||
|
) : Diff {
|
||
|
public readonly string Before = before ?? throw new ArgumentNullException(nameof(before));
|
||
|
public readonly string After = after ?? before;
|
||
|
public readonly StringComparison ComparisonType = comparisonType;
|
||
|
|
||
|
public bool Changed => !Before.Equals(After, ComparisonType);
|
||
|
}
|