/// <summary> /// Extends Remove.Starting action with the ability to set end position for removal to the given occurrence of the marker. /// This allows to make Remove.Starting.To action inclusive. /// <para>N.B.: Default Remove().Starting().To() is equivalent of Remove().Starting().To().From(The.Beginning)</para> /// </summary> /// <param name="position">Exact position for removal point.</param> /// <param name="occurrence">Occurrence count to start from.</param> /// <param name="of">Marker value for removal point.</param> /// <exception cref="System.ArgumentOutOfRangeException">Thrown when Beginning or End position value is used.</exception> public static RemoveStringStartingToOccurrencePosition To(this RemoveStringStarting source, The position, int occurrence, string of) { return(new RemoveStringStartingToOccurrencePosition(source, position, occurrence, of)); }
/// <summary> /// Extends Remove.Starting action with the ability to set end position for removal to the given occurrence of the marker. /// This action is exclusive. /// <para>N.B.: Default Remove().Starting().To() is equivalent of Remove().Starting().To().From(The.Beginning)</para> /// </summary> /// <param name="occurrence">Occurrence count to remove to.</param> /// <param name="of">Marker value for removal point.</param> public static RemoveStringStartingToOccurrence To(this RemoveStringStarting source, int occurrence, string of) { return(new RemoveStringStartingToOccurrence(source, occurrence, of)); }
/// <summary> /// Extends Remove.Starting action with the ability to set end position for removal to the first occurrence of the marker. /// This allows to make Remove.Starting.To action inclusive. /// <para>N.B.: Default Remove().Starting().To() is equivalent of Remove().Starting().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 RemoveStringStartingToOccurrencePosition To(this RemoveStringStarting source, The position, string marker) { return(source.To(position, 1, of: marker)); }
/// <summary> /// Extends Remove.Starting action with the ability to set end position for removal to the first marker. /// This action is exclusive. /// <para>N.B.: Default Remove().Starting().To() is equivalent of Remove().Starting().To().From(The.Beginning)</para> /// </summary> /// <param name="marker">Marker value for removal point.</param> public static RemoveStringStartingToOccurrence To(this RemoveStringStarting source, string marker) { return(source.To(1, of: marker)); }
/// <summary> /// Extends Remove.Starting action with the ability to set end position for removal. /// This action is exclusive. /// <para>N.B.: Default Remove().Starting().To() is equivalent of Remove().Starting().To().From(The.Beginning)</para> /// </summary> /// <param name="position">End position in string for removal.</param> public static RemoveStringStartingTo To(this RemoveStringStarting source, int position) { return(new RemoveStringStartingTo(source, position)); }
public static RemoveStringStartingPrevious Previous(this RemoveStringStarting source, int chars) { return(new RemoveStringStartingPrevious(source, chars)); }
public static RemoveStringStartingNext Next(this RemoveStringStarting source, int chars) { return(new RemoveStringStartingNext(source, chars)); }
public static RemoveStringStartingFrom From(this RemoveStringStarting source, The position) { return(new RemoveStringStartingFrom(source, position)); }