/// <summary> /// Removes substring up to the first occurrence of the marker in the source string. /// This allows to make Remove.To action inclusive. /// <para>N.B.: Default Remove().To() is equivalent of Remove().To().From(The.Beginning)</para> /// </summary> /// <param name="position">Exact position for removal point.</param> /// <param name="marker">Marker value for removal point.</param> /// <exception cref="System.ArgumentOutOfRangeException">Thrown when Beginning or End position value is used.</exception> public static RemoveStringToOccurrencePosition To(this RemoveString source, The position, string marker) { return(source.To(position, 1, of: marker)); }
/// <summary> /// Removes substring up to the first marker in the source string. /// This action is exclusive. /// <para>N.B.: Default Remove().To() is equivalent of Remove().To().From(The.Beginning)</para> /// </summary> /// <param name="marker">Marker value for removal point.</param> public static RemoveStringToOccurrence To(this RemoveString source, string marker) { return(source.To(1, of: marker)); }