LikeStringExtension extension

Null-safe String extension utilities available on both String and String?.

on

Properties

capitalize → String

Available on String?, provided by the LikeStringExtension extension

Capitalizes the first letter of the string safely. Returns empty string "" if null/empty.
no setter
isEmail → bool

Available on String?, provided by the LikeStringExtension extension

Whether the string is a valid email address.
no setter
isNotNullOrEmpty → bool

Available on String?, provided by the LikeStringExtension extension

Whether the string is non-null and not empty/whitespace.
no setter
isNullOrEmpty → bool

Available on String?, provided by the LikeStringExtension extension

Whether the string is null, empty, or whitespace only.
no setter
isUrl → bool

Available on String?, provided by the LikeStringExtension extension

Whether the string is a valid URL.
no setter
titleCase → String

Available on String?, provided by the LikeStringExtension extension

Capitalizes the first letter of each word in the string safely.
no setter

Methods

capitalizeOr(String fallback) → String

Available on String?, provided by the LikeStringExtension extension

Returns the capitalized string or fallback if null/empty.