NullableStringExtensions extension

Safe helper methods for nullable strings.

on

Methods

capitalizeFirst() String

Available on String?, provided by the NullableStringExtensions extension

Capitalizes the first character and keeps the remaining string intact.
orDash() String

Available on String?, provided by the NullableStringExtensions extension

Returns the value or -- when null or blank.
orEmpty() String

Available on String?, provided by the NullableStringExtensions extension

Returns the value or an empty string.
toTitleCase() String

Available on String?, provided by the NullableStringExtensions extension

Converts the string into title case.