Class StringExtensions
Extension methods for strings.
Inherited Members
Namespace: Unity.AppUI.Core
Assembly: Unity.AppUI.dll
Syntax
public static class StringExtensions
Methods
Capitalize(string)
Capitalizes the first letter of a string.
Declaration
public static string Capitalize(this string arg)
Parameters
| Type | Name | Description |
|---|---|---|
| string | arg | The string to capitalize. |
Returns
| Type | Description |
|---|---|
| string | The capitalized string. |
GetInitials(string)
Gets the initials from a name string.
Declaration
public static string GetInitials(this string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name to extract initials from. |
Returns
| Type | Description |
|---|---|
| string | The uppercase initials: first letter of the first two words for multi-word names, first two characters for single-word names with 2+ characters, the single character for one-character names, or "?" if the string is null or empty. |