/// <summary>Set the value at the specified subdivision index.</summary> /// <param name="index">Index to set.</param> /// <param name="value">New value.</param> private void SetValue(int index, string value) { PadSubDivider(index); var d = Divisions[index]; Replace(d.Offset, d.Length, StringDividerOperations.GetChars(value)); }
/// <summary>Set the string value at the specified index.</summary> /// <param name="index">Index to change.</param> /// <param name="value">New value.</param> private void SetValue(int index, string value) { Pad(Delimiter, index, 0, _valueChars.Length, Divisions); var d = Divisions[index]; Replace(d.Offset, d.Length, StringDividerOperations.GetChars(value)); }
/// <summary>Create a divider for a specified string.</summary> /// <param name="s">String to divide.</param> /// <param name="delimiter">Delimiter to search for.</param> public RootStringDivider(string s, char delimiter) { Delimiter = delimiter; ValueChars = StringDividerOperations.GetChars(s); }