adTempus API
ArcanaDevelopment.adTempus.Shared Namespace / StringUtil Class / LimitText Method

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
     
    
    Public Shared Function LimitText( _
       ByVal source As String, _
       ByVal maxLength As Integer, _
       ByVal includeEllipsis As Boolean _
    ) As String
    public static string LimitText( 
       string source,
       int maxLength,
       bool includeEllipsis
    )

    Parameters

    source
    maxLength
    includeEllipsis
    Remarks
    If includeEllipsis is true, the source is shortened to less than maxLength to accommodate the ellipsis (the returnes string will never be longer than maxLength).
    See Also