HelpersExtensionsTruncate Method |
Truncates string to specified length.
Namespace: CMS.HelpersAssembly: CMS.Helpers (in CMS.Helpers.dll) Version: 13.0.131
Syntax public static string Truncate(
this string str,
int length
)
Parameters
- str
- Type: SystemString
Given string - length
- Type: SystemInt32
Length to truncate string to
Return Value
Type:
StringTruncated string.
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
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also