Geta.EPi.Extensions : API Documentation

Type StringExtensions

Namespace Geta.EPi.Extensions

String extensions.

Methods

Public static methods

string StripHtml(this string htmlText, int maxLength)

Strip all HTML elements from a HTML string and return text.
Parameters
string htmlText
A HTML string.
int maxLength
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
string input
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
string input
Source string.
Returns
Nullable<long>
long (Int64) value if parse succeeds otherwise null.