/// <summary> /// Concatenate two elements into a new <see cref="Substitution"/>. /// </summary> /// <param name="left">The first element to concatenate.</param> /// <param name="right">The second element to concatenate.</param> /// <exception cref="ArgumentNullException"><paramref name="right"/> is <c>null</c>.</exception> public static Substitution operator +(char left, Substitution right) { if (right == null) { throw new ArgumentNullException(nameof(right)); } return(Substitutions.Text(left).Append(right)); }
/// <summary> /// Concatenate two elements into a new <see cref="Substitution"/>. /// </summary> /// <param name="left">The first element to concatenate.</param> /// <param name="right">The second element to concatenate.</param> /// <exception cref="ArgumentNullException"><paramref name="left"/> is <c>null</c>.</exception> public static Substitution operator +(Substitution left, char right) { if (left == null) { throw new ArgumentNullException(nameof(left)); } return(left.Append(Substitutions.Text(right))); }
/// <summary> /// Appends a specified character to the substitution pattern. /// </summary> /// <param name="value">A Unicode character to append.</param> public Substitution Text(char value) => Append(Substitutions.Text(value));
/// <summary> /// Appends a specified text to the substitution pattern. /// </summary> /// <param name="value">A text to append.</param> public Substitution Text(string value) => Append(Substitutions.Text(value));