Class StringExtensions
- Namespace
- AbanoubNassem.Trinity.Extensions
- Assembly
- AbanoubNassem.Trinity.dll
Adds extra functionality to string.
public static class StringExtensions
- Inheritance
-
StringExtensions
- Inherited Members
Methods
Words(string, int, string)
Limit the number of words in a string.
public static string Words(this string str, int words = 100, string end = "...")
Parameters
str
stringThe string to be limited
words
intThe count of words to limit the given string to.
end
stringSpecify which string should be appended to the end of the truncated string.