4 using System.Runtime.InteropServices;
6 namespace SiliconStudio.Core
11 [StructLayout(LayoutKind.Sequential)]
43 return Start >= 0 && Length > 0;
55 return Start + Length;
61 return Start == other.Start && Length == other.Length;
64 public override bool Equals(
object obj)
66 if (ReferenceEquals(null, obj))
return false;
74 return (Start*397) ^ Length;
80 return left.Equals(right);
85 return !left.Equals(right);
90 return IsValid ? string.Format(
"[{0}-{1}]", Start, Next - 1) :
"[N/A]";
_Use_decl_annotations_ bool IsValid(DXGI_FORMAT fmt)
StringSpan(int start, int length)
Initializes a new instance of the StringSpan struct.
override int GetHashCode()
override string ToString()
int Start
The start of the span.
override bool Equals(object obj)
bool Equals(StringSpan other)
int Length
The length of the span
A region of character in a string.