Type StringExtensions
Namespace Geta.EPi.Extensions
Public static methods
string StripHtml(this string htmlText, int maxLength)
Strip all HTML elements from a HTML string and return text.
Parameters
-
stringhtmlText - A HTML string.
-
intmaxLength - Max string length to return. 0 returns all text in the HTML string.
Returns
-
string - A string with text.
Nullable<int> TryParseInt32(this string input)
Parses string to nullable int (Int32).
Parameters
-
stringinput - Source string.
Returns
-
Nullable<int> - int (Int32) value if parse succeeds otherwise null.
Nullable<long> TryParseInt64(this string input)
Parses string to nullable long (Int64).
Parameters
-
stringinput - Source string.
Returns
-
Nullable<long> - long (Int64) value if parse succeeds otherwise null.