Ghost1372

everything can be handy

StringExtension

Name
IsEmail
IsDecimal
IsNumeric
IsPhoneNumber
IsCharacterString
DecodeHtml
FixHtml
Truncate
GetHash

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

bool output1 = text.IsEmail();

//

bool output2 = text.IsDecimal();

//

bool output3 = text.IsNumeric();

//

bool output4 = text.IsPhoneNumber();

//

bool output5 = text.IsCharacterString();

//

var output6 = text.DecodeHtml(); // Returns a string with HTML comments, scripts, styles, and tags removed.

//

var output7 = text.FixHtml(); // Returns a string with HTML comments, scripts, and styles removed.

//

var output8 = text.Truncate(length); // Truncates a string to the specified length.

Demo

you can run demo and see this feature.

0%