Class StringExtensions
Extension methods for the String class.
Inheritance
System.Object
StringExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Shell.Web
Assembly: EPiServer.Shell.dll
Version: 8.11.0Syntax
public static class StringExtensions
Methods
Ellipsis(String, Int32)
Trims excessivly long strings replacing it's end with ...
Declaration
public static string Ellipsis(this string text, int maxLength)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | |
System.Int32 | maxLength |
Returns
Type | Description |
---|---|
System.String |
TrimControllerSuffix(String)
Removes the "Controller" suffix from the given controller name.
Declaration
public static string TrimControllerSuffix(string controllerName)
Parameters
Type | Name | Description |
---|---|---|
System.String | controllerName | A string representing a controller. |
Returns
Type | Description |
---|---|
System.String | A trimmed name without the controller ending. |
TrimEnd(String, String)
Removes one instance of a text from the end of a string.
Declaration
public static string TrimEnd(this string text, string textToTrim)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | |
System.String | textToTrim |
Returns
Type | Description |
---|---|
System.String |