Ejemplo n.º 1
0
 /// <summary>
 /// Extends Truncate action with the ability to append ellipsis at the end.
 /// <para>N.B.: Pay attention that length specified for truncate includes ellipsis.</para>
 /// </summary>
 public static TruncateStringWith WithEllipsis(this TruncateString source)
 {
     return(new TruncateStringWith(source, "..."));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Extends Truncate action with the ability to change starting point.
 /// N.B.: TruncateTo().From(The.Beginning) is equivalent of the default TruncateTo()
 /// </summary>
 /// <param name="position">
 /// Position in source string to start from. Beginning or End values could be used
 /// </param>
 /// <exception cref="ArgumentOutOfRangeException">Thrown when StartOf or EndOf position value is used</exception>
 public static TruncateStringFrom From(this TruncateString source, The position)
 {
     return(new TruncateStringFrom(source, position));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Extends Truncate action with the ability to append custom text at the end.
 /// <para>N.B.: Pay attention that length specified for truncate includes appended value.</para>
 /// <param name="value">String to be appended at the end</param>
 /// </summary>
 public static TruncateStringWith With(this TruncateString source, string value)
 {
     return(new TruncateStringWith(source, value));
 }