Skip to main content
1

πŸ›‘οΈ Null-Safety (String?)

String
Returns the original string if it is not null and not empty, otherwise returns the provided defaultValue. Guarantees a non-null, non-empty result.
2

πŸ”’ Security & Encoding

String
Masks the central portion of the string while keeping a fixed number of characters visible at the beginning and end. Essential for sensitive data.
String
URL-encodes the string, replacing illegal or unsafe characters (e.g., spaces) with percent-encoded equivalents.
3

πŸ”— Boundaries & Wrapping

String
Ensures that the string ends with the specified suffix. The suffix is appended only if the string is not empty and does not already end with it.
String
Ensures that the string starts with the specified prefix. The prefix is prepended only if the string is not empty and does not already start with it.
String
Wraps the string with the specified left and right delimiters.
String
Prepends a # symbol and removes all spaces, formatting the string into a standardized hashtag.
String
Appends a graphical emoji representation to the end of the string, separated by a space.
4

πŸ’― Display & Utility

String
Converts a numeric string into its ordinal form (e.g., β€œ1st”, β€œ2nd”, β€œ23rd”). Requires isDigitsOnly() to be available.
String
Truncates the string if its length exceeds maxLength and appends an ellipsis (”…”).
String
Truncates a full name (first and last name) to show the first name and the initial of the last name (e.g., β€œJohn D.”).
String
Reverses the order of the characters in the string.
String
Retrieves the last N characters of the string.