Kentico 12 Service Pack API Reference
Kentico 12 Service Pack API Reference
Namespaces
CMS Namespaces
CMS.Helpers Namespaces
CMS.Helpers
HelpersExtensions Class
HelpersExtensions Methods
Append Method
AppendIndent Method
Join Method
NewLine Method
NthIndexOf Method
Truncate Method
TryReadXml Method
HelpersExtensions
Truncate Method
Truncates string to specified length.
Namespace:
CMS.Helpers
Assembly:
CMS.Helpers (in CMS.Helpers.dll) Version: 12.0.0
Syntax
C#
Copy
public
static
string
Truncate
(
this
string
str
,
int
length
)
Parameters
str
Type:
System
String
Given string
length
Type:
System
Int32
Length to truncate string to
Return Value
Type:
String
Truncated 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
Reference
HelpersExtensions Class
CMS.Helpers Namespace
Copyright (c) 2019 Kentico Software
Send comments on this topic to
support@kentico.com