string_extensions 0.2.3
string_extensions: ^0.2.3 copied to clipboard
Useful String extensions to save you time in production. Feel free to contribute with PR.
0.2.3 New extensions #
Squeezes a string to a character
squeeze(String x);
Check if the string is consisted of same characters.
hasSameCharacters();
Shuffles the word's letters.
shuffle();
Gets the Levenshtein distance of two strings
getLevenshtein();
Checks if a string is a valid Url.
isUrl();
Checks if a string is a valid Date.
isDate();
0.2.2 New extensions #
Repeats a string x times
repeat(int x);
Check if the string is a valid Ipv6
isIpv6();
Check if the string is a number
isNumber();
An extension that makes easier handling empty strings.
ifEmpty(()=>print('The string is empty'));
0.2.1 Downgrade test library version #
Some projects were breaking due to they depending on test_api:3.0.0 version.
0.2.0 Adds tests #
0.1.4 New extension #
Method to check whether a string is a valid Guid.
isGuid()
0.1.3 New extensions #
Method to get a list of characters in a string.
toStringArray()
Method to strip all HTML code from a string.
stripHtml()
Method to check whether a string is a strong password.
isStrongPassword()
0.1.2 New extensions & Code refactor #
-
Adds isEmpty checks on all extensions.
-
Given a string and a pattern, finds the starting indices of all occurrences of the pattern in the string.
findPattern({required String pattern})
0.1.1 New extensions #
Useful method to normalize greek text for more performant text searches.
replaceGreek()
0.1.0 New extensions #
first({int count})
last({int count})
toSlug()