Class StringExtensions
Extension methods for strings.
Assembly: Dalamud.dll
View Source
Declaration
public static class StringExtensions
Methods
Format(string, params object[])
An extension method to chain usage of string.Format.
View Source
Declaration
public static string Format(this string format, params object[] args)
Returns
System.String
: Formatted string.
Parameters
Type | Name | Description |
---|---|---|
System.String | format | Format string. |
System.Object[] | args | Format arguments. |
IsNullOrEmpty(string?)
Indicates whether the specified string is null or an empty string ("").
View Source
Declaration
public static bool IsNullOrEmpty(this string? value)
Returns
System.Boolean
: true if the value parameter is null or an empty string (""); otherwise, false.
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The string to test. |
IsNullOrWhitespace(string?)
Indicates whether a specified string is null, empty, or consists only of white-space characters.
View Source
Declaration
public static bool IsNullOrWhitespace(this string? value)
Returns
System.Boolean
: true if the value parameter is null or an empty string (""), or if value consists exclusively of white-space characters.
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The string to test. |
IsValidCharacterName(string, bool)
Validate if character name is valid using game check.
View Source
Declaration
public static bool IsValidCharacterName(this string value, bool includeLegacy = true)
Returns
System.Boolean
: indicator if character is name is valid.
Parameters
Type | Name | Description |
---|---|---|
System.String | value | character name to validate. |
System.Boolean | includeLegacy | include legacy names (combined can be 30 instead of 20). |