public bool StartsWith(StringSpan value) { for (int i = 0; i < value.Length; i++) { if (this[i] != value[i]) { return(false); } } return(true); }
public bool EndsWith(StringSpan value) { for (int i = Length - value.Length; i < Length; i++) { if (this[i] != value[i]) { return(false); } } return(true); }
public bool Contains(StringSpan value) { for (int i = 0; i < Length; i++) { for (int j = 0; j < value.Length && i + j < Length; j++) { if (this[i + j] != value[j]) { break; } if (j == value.Length - 1) { return(true); } } } return(false); }