adTempus API
ArcanaDevelopment.adTempus.Shared Namespace / StringUtil Class / LimitText Method
The string to limit
The maximum length
Whether to append an ellipsis (...) if the string is truncated. See Remarks.


In This Topic
    LimitText Method
    In This Topic
    Truncates a string to the specified length, optionally appending an ellipsis to the string to indicate that it has been truncated.
    Syntax
    'Declaration
     
    
    <NotNullAttribute()>
    Public Shared Function LimitText( _
       ByVal source As String, _
       ByVal maxLength As Integer, _
       ByVal includeEllipsis As Boolean _
    ) As String
    [NotNull()]
    public static string LimitText( 
       string source,
       int maxLength,
       bool includeEllipsis
    )
    [NotNull()]
    public:
    static String^ LimitText( 
       String^ source,
       int maxLength,
       bool includeEllipsis
    ) 

    Parameters

    source
    The string to limit
    maxLength
    The maximum length
    includeEllipsis
    Whether to append an ellipsis (...) if the string is truncated. See Remarks.
    Remarks
    If includeEllipsis is true, the source is shortened to less than maxLength to accommodate the ellipsis (the returned string will never be longer than maxLength).
    See Also