summaryM:DotNetNuke.Common.Utilities.StringExtensions.TrimToLength(System.String,System.Int32)

Namespace: DotNetNuke.Common.Utilities
Assembly: DotNetNuke (in DotNetNuke.dll)

Syntax

C#
public static string TrimToLength(
	this string source,
	int maxLength
)
Visual Basic
<ExtensionAttribute> 
Public Shared Function TrimToLength ( 
	source As String,
	maxLength As Integer
) As String

Parameters

source
Type: System..::..String
paramsourceM:DotNetNuke.Common.Utilities.StringExtensions.TrimToLength(System.String,System.Int32)
maxLength
Type: System..::..Int32
parammaxLengthM:DotNetNuke.Common.Utilities.StringExtensions.TrimToLength(System.String,System.Int32)

Return Value

returnsM:DotNetNuke.Common.Utilities.StringExtensions.TrimToLength(System.String,System.Int32)

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see [b8020aae-374d-46a9-bcb7-8cc2390b93b6] or [175ce3ff-9bbf-4e64-8421-faeb81a0bb51].

See Also