Click or drag to resize

StringUtilsInitials Method

Gets the initials for the provided string (assuming the string is a person's name). Can also be used to get an automatic acronym. Condenses all whitespace to single spaces, trims whitespace, then returns the initial character of each word, capitalized. For exmaple, "Jane Doe" returns "JD", "Central Intelligence Agency" returns "CIA", and "This is my sentence" returns "TIMS".

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public static string Initials(
	string s
)

Parameters

s
Type: SystemString
The string to process.

Return Value

Type: String
The initials/acronym string.
See Also