public int IndexOf(String2 source, int index) { if (source.Length < 1) { return(-1); } if (Length < source.Length + index) { return(-1); } for (int i = index; i <= Length - source.Length; i++) { if (String2.CheckByte(data, i, source.ToBytes(), 0, source.Length)) { return(i); } } return(-1); }
public int IndexLastOf(String2 source) { if (source.Length < 1) { return(-1); } if (Length < source.Length) { return(-1); } for (int i = Length - source.Length - 1; i >= 0; i--) { if (String2.CheckByte(data, i, source.ToBytes(), 0, source.Length)) { return(i); } } return(-1); }
public bool CheckEnd(String2 separator) { return(CheckEnd(separator.ToBytes())); }