StringExtensions extension
- on
Properties
- asColor → Color
-
Available on String, provided by the StringExtensions extension
Converts a string to a color.no setter - asDirectory → Directory?
-
Available on String, provided by the StringExtensions extension
Return a Directory if the string is a directory or file path, otherwise return null.no setter - asFile → File?
-
Available on String, provided by the StringExtensions extension
Return a File if the string is a file path, otherwise return null.no setter - asNullable → String?
-
Available on String, provided by the StringExtensions extension
no setter - base64 → string
-
Available on String, provided by the StringExtensions extension
Return a base64 encoded stringno setter - blankIfZero → String
-
Available on String, provided by the StringExtensions extension
no setter - camelSplit → StringList
-
Available on String, provided by the StringExtensions extension
Splits a camel case string into individual words. Returns a list of strings representing the words in the camel case string.no setter - camelSplitString → string
-
Available on String, provided by the StringExtensions extension
Returns a string with camel case split into separate words.no setter - capitalizeFirst → string
-
Available on String, provided by the StringExtensions extension
no setter -
charOccurences
→ List<
Map< String, int> > -
Available on String, provided by the StringExtensions extension
Finds all character occurrences and returns count as:no setter - countryEmoji → String
-
Available on String, provided by the StringExtensions extension
Returns a new string with the flag of the specified country code.no setter - countWords → int
-
Available on String, provided by the StringExtensions extension
Returns the word count in the givenString
.no setter - digitCount → int
-
Available on String, provided by the StringExtensions extension
Returns the digit count of theString
.no setter - fixPath → string
-
Available on String, provided by the StringExtensions extension
fix the slashes in path by removing duplicates and replacing with the most common one for that platformno setter - fixQuotes → string
-
Available on String, provided by the StringExtensions extension
Fix the whitespaces in a string by removing spaces after opening a quote and before closing a quote.no setter - fixText → String
-
Available on String, provided by the StringExtensions extension
Fixes the givenvalue
by applying various text formatting rules.no setter - formatFileSize → String
-
Available on String, provided by the StringExtensions extension
Returns a formatted string representation of the file size.no setter - generateBarcodeCheckSum → String
-
Available on String, provided by the StringExtensions extension
Return a checksum digit for a barcodeno setter - getOppositeWrap → String
-
Available on String, provided by the StringExtensions extension
Returns the opposite wrap char of theString
if possible, otherwise returns the sameString
.no setter -
getUniqueWords
→ Iterable<
string> -
Available on String, provided by the StringExtensions extension
Returns a list with distinct words of this sentenceno setter -
getWords
→ Iterable<
string> -
Available on String, provided by the StringExtensions extension
Returns a list with words of this sentenceno setter - hasCapitalLetter → bool
-
Available on String, provided by the StringExtensions extension
Checks if string contains at least one Capital Letterno setter - hasSameCharacters → bool
-
Available on String, provided by the StringExtensions extension
Checks if theString
is consisted of same characters (ignores cases).no setter - hasWhitespace → bool
-
Available on String, provided by the StringExtensions extension
Checks whether theString
has any whitespace characters.no setter - isAscii → bool
-
Available on String, provided by the StringExtensions extension
Checks whether theString
is a valid ASCII string.no setter - isBlank → bool
-
Available on String, provided by the StringExtensions extension
Checks if theString
is Blank (null, empty or only white spaces).no setter - isBool → bool
-
Available on String, provided by the StringExtensions extension
Checks if string is boolean.no setter - isCloseWrap → bool
-
Available on String, provided by the StringExtensions extension
Check if theString
is a close wrap char:>
,}
,]
,"
,'
.no setter - isCreditCard → bool
-
Available on String, provided by the StringExtensions extension
Checks if theString
provided is a valid credit card number using Luhn Algorithm.no setter - isDate → bool
-
Available on String, provided by the StringExtensions extension
Checks whether theString
is a validDateTime
:no setter - isEmail → bool
-
Available on String, provided by the StringExtensions extension
no setter - isGreek → bool?
-
Available on String, provided by the StringExtensions extension
Checks if theString
has only Greek characters.no setter - isGuid → bool
-
Available on String, provided by the StringExtensions extension
Checks whether theString
is a valid Guid.no setter - isHexadecimal → bool
-
Available on String, provided by the StringExtensions extension
no setter - isHexadecimalColor → bool
-
Available on String, provided by the StringExtensions extension
no setter - isIP → bool
-
Available on String, provided by the StringExtensions extension
no setter - isIPv4 → bool
-
Available on String, provided by the StringExtensions extension
no setter - isIPv6 → bool
-
Available on String, provided by the StringExtensions extension
no setter - isJson → bool
-
Available on String, provided by the StringExtensions extension
Checks if theString
is a validjson
format.no setter - isLatin → bool
-
Available on String, provided by the StringExtensions extension
Checks if theString
has only Latin characters.no setter - isLettersOnly → bool
-
Available on String, provided by the StringExtensions extension
Returnstrue
if theString
contains only letters (Latin or Greek).no setter - isLowerCase → bool
-
Available on String, provided by the StringExtensions extension
Checks whether theString
is in lowercase.no setter - isMixedCase → bool
-
Available on String, provided by the StringExtensions extension
Checks whether theString
is consisted of both upper and lower case letters.no setter - isMultipleCloseWrap → bool
-
Available on String, provided by the StringExtensions extension
no setter - isMultipleOpenWrap → bool
-
Available on String, provided by the StringExtensions extension
no setter - isNotBlank → bool
-
Available on String, provided by the StringExtensions extension
Checks if theString
is not blank (null, empty or only white spaces).no setter - isNotNumber → bool
-
Available on String, provided by the StringExtensions extension
no setter - isNumber → bool
-
Available on String, provided by the StringExtensions extension
Checks whether theString
is a number.no setter - isNumberOrBlank → bool
-
Available on String, provided by the StringExtensions extension
no setter - isNumericOnly → bool
-
Available on String, provided by the StringExtensions extension
no setter - isOpenWrap → bool
-
Available on String, provided by the StringExtensions extension
Check ifString
is a open wrap char:<
,{
,[
,"
,'
.no setter - isPalindrome → bool
-
Available on String, provided by the StringExtensions extension
Checks whether theString
is a palindrome.no setter - isStrongPassword → bool
-
Available on String, provided by the StringExtensions extension
Checks whether theString
complies to below rules :no setter - isSwiftCode → bool?
-
Available on String, provided by the StringExtensions extension
Checks whether the providedString
is a valid Swift code.no setter - isUnique → bool
-
Available on String, provided by the StringExtensions extension
Checks whether theString
is consisted of only unique characters.no setter - isUpperCase → bool
-
Available on String, provided by the StringExtensions extension
Checks whether theString
is in uppercase.no setter - isURLOrIP → bool
-
Available on String, provided by the StringExtensions extension
Checks if theString
is a valid URL or IP address. Allow URls and IPs with or without http:// or https:// and with or without port.no setter - isValidEAN → bool
-
Available on String, provided by the StringExtensions extension
Checks if the string is a valid EAN (European Article Number) barcode.no setter - md5 → String
-
Available on String, provided by the StringExtensions extension
Returns the MD5 hash of theString
.no setter - onlyLetters → String
-
Available on String, provided by the StringExtensions extension
Returns only the Latin OR Greek characters from theString
.no setter - onlyLettersOrNumbers → String
-
Available on String, provided by the StringExtensions extension
no setter - onlyNumbers → String
-
Available on String, provided by the StringExtensions extension
Returns only the numbers from theString
.no setter - onlyNumbersDotsAndCommas → String
-
Available on String, provided by the StringExtensions extension
no setter - onlyNumbersDouble → double
-
Available on String, provided by the StringExtensions extension
no setter - onlyNumbersInt → int
-
Available on String, provided by the StringExtensions extension
Returns the integer representation of the string, considering only the numeric characters. If the string does not contain any numeric characters, it returns null.no setter -
pascalSplit
→ List<
String> -
Available on String, provided by the StringExtensions extension
Splits a pascal case string into individual words. Returns a list of strings representing the words in the pascal case string.no setter - pascalSplitString → String
-
Available on String, provided by the StringExtensions extension
Returns a string with pascal case split into separate words.no setter - quote → String
-
Available on String, provided by the StringExtensions extension
Quotes theString
adding "" at the start & at the end.no setter - removeBreakLines → string
-
Available on String, provided by the StringExtensions extension
remove all break lines from theString
.no setter - removeDiacritics → String
-
Available on String, provided by the StringExtensions extension
Removes diacritics from the string. Diacritics are accents or other marks added to letters in some languages. If the string is blank, it returns a blank string. If a diacritic is not found in the map, it keeps the original character. Returns the modified string with diacritics removed.no setter - removeLetters → String
-
Available on String, provided by the StringExtensions extension
Removes only the letters from theString
.no setter - removeNumbers → String
-
Available on String, provided by the StringExtensions extension
Removes only the numbers from theString
.no setter - removeSpecial → String
-
Available on String, provided by the StringExtensions extension
Returns all special characters from theString
.no setter - removeWhiteSpace → String
-
Available on String, provided by the StringExtensions extension
Removes all whitespace from theString
.no setter - removeWordSplitters → string
-
Available on String, provided by the StringExtensions extension
Removes all word splitters from theString
.no setter - reverse → String
-
Available on String, provided by the StringExtensions extension
Returns theString
reversed.no setter - shuffle → String
-
Available on String, provided by the StringExtensions extension
Shuffles the givenString
's characters.no setter -
splitLines
→ Iterable<
String> -
Available on String, provided by the StringExtensions extension
Splits theString
into aList
of lines ('\r\n' or '\n').no setter - stripHtml → String
-
Available on String, provided by the StringExtensions extension
Strips all HTML code fromString
.no setter -
toArray
→ List<
String> -
Available on String, provided by the StringExtensions extension
Returns a list of theString
's characters.no setter - toBool → bool?
-
Available on String, provided by the StringExtensions extension
Try parse a bool value. See asBool to convert strings into bool in a more efficient wayno setter - toCamelCase → String
-
Available on String, provided by the StringExtensions extension
Returns theString
in Camel Case.no setter - toCamelCaseJoin → string
-
Available on String, provided by the StringExtensions extension
Returns a string in camel case format by splitting the original string using word splitters and joining them together.no setter - toDouble → double?
-
Available on String, provided by the StringExtensions extension
Converts aString
todouble
if possible.no setter - toDoubleOrZero → double
-
Available on String, provided by the StringExtensions extension
no setter - toInt → int?
-
Available on String, provided by the StringExtensions extension
Converts aString
toint
if possible.no setter - toIntOrZero → int
-
Available on String, provided by the StringExtensions extension
no setter - toLeet → String
-
Available on String, provided by the StringExtensions extension
Transforms theString
to 1337 alphabet.no setter - toNum → num?
-
Available on String, provided by the StringExtensions extension
Converts aString
to a numeric value if possible.no setter - toNumOrZero → num
-
Available on String, provided by the StringExtensions extension
no setter - toSize → Size
-
Available on String, provided by the StringExtensions extension
Interprets a string in various ways and transforms it into aSize
object.no setter - toSlugCase → String
-
Available on String, provided by the StringExtensions extension
Returns theString
to slug case.no setter - toSnakeCase → String
-
Available on String, provided by the StringExtensions extension
Returns theString
to snake_case.no setter - totalLines → int
-
Available on String, provided by the StringExtensions extension
no setter - trimAll → String
-
Available on String, provided by the StringExtensions extension
Trims leading and trailing spaces from theString
, so as extra spaces in between words.no setter - unwrap → String
-
Available on String, provided by the StringExtensions extension
removeno setter - urlDecode → String
-
Available on String, provided by the StringExtensions extension
Returns the URL-decoded version of the string.no setter - urlEncode → String
-
Available on String, provided by the StringExtensions extension
Returns the URL-encoded version of the string.no setter - urlFriendly → string
-
Available on String, provided by the StringExtensions extension
Returns a string ready for use in url paths.no setter
Methods
-
addAfter(
String pattern, String addition) → String -
Available on String, provided by the StringExtensions extension
Adds aString
after the first match of thepattern
. Thepattern
should not benull
. -
addBefore(
String pattern, String adition) → String -
Available on String, provided by the StringExtensions extension
Adds aString
before the first match of thepattern
. Thepattern
should not benull
. -
after(
String char) → String -
Available on String, provided by the StringExtensions extension
Returns the right side of theString
starting fromchar
. -
append(
String? suffix) → String -
Available on String, provided by the StringExtensions extension
Appends asuffix
to theString
. -
applyXorEncrypt(
String key) → String -
Available on String, provided by the StringExtensions extension
Applies XOR operation between thethis
string and thekey
string. -
asIf(
bool comparison(String?), String? trueString, String? falseString) → String? -
Available on String, provided by the StringExtensions extension
Comparesthis
usingcomparison
and returnstrueString
if true, otherwise returnfalseString
. -
before(
String char) → String -
Available on String, provided by the StringExtensions extension
Returns the left side of theString
starting fromchar
. -
between(
String before, String after) → String -
Available on String, provided by the StringExtensions extension
Returns the text betweenbefore
andafter
strings. -
blankIf(
bool fn(String? s)) → String -
Available on String, provided by the StringExtensions extension
-
blankIfEqual(
String? comparisonString) → String? -
Available on String, provided by the StringExtensions extension
-
changeDateFormat(
string toFormat, [string? fromFormat, string? locale]) → string -
Available on String, provided by the StringExtensions extension
change a date string from a format to another format -
charAt(
int index) → String -
Available on String, provided by the StringExtensions extension
Returns the character atindex
of theString
. -
commonCharacters(
String otherString, {bool caseSensitive = true, bool sort = true, bool includeSpaces = false}) → Set< String> -
Available on String, provided by the StringExtensions extension
Returns aSet
of the common characters between the twoString
s. -
containsAll(
Iterable< string?> patterns) → bool -
Available on String, provided by the StringExtensions extension
Checks if theString
matches ALL givenpatterns
. -
containsAllCharacters(
String characters) → bool -
Available on String, provided by the StringExtensions extension
Checks whether all characters are contained in theString
. -
containsAny(
Iterable< string?> patterns) → bool -
Available on String, provided by the StringExtensions extension
Checks if theString
matches ANY of the givenpatterns
. -
count(
[String subString = ""]) → int -
Available on String, provided by the StringExtensions extension
Counts the occurrences of a substring within a string. -
countAny(
Iterable< String> patterns) → int -
Available on String, provided by the StringExtensions extension
-
emptyIf(
String? comparisonString) → String -
Available on String, provided by the StringExtensions extension
Return a emptyString
ifthis
equalscomparisonString
. Otherwise returnthis
. -
endsWithAny(
Iterable< String> strings) → bool -
Available on String, provided by the StringExtensions extension
Checks if the string ends with any of the provided strings. Returnstrue
if the string ends with any of the provided strings,false
otherwise. -
fetchGoogleSuggestions(
{String language = ""}) → Future< List< String> > -
Available on String, provided by the StringExtensions extension
Fetches Google suggestions based on the given language. Returns a list of suggestions as strings. If the language is not provided, it defaults to an empty string. -
findByRegex(
String pattern, {bool caseSensitive = true, bool multiLine = false}) → Iterable< String> -
Available on String, provided by the StringExtensions extension
Procura valores em uma string usando expressões regulares -
findNumbers(
) → Iterable< String> -
Available on String, provided by the StringExtensions extension
Procura numeros em uma string e retorna uma lista deles -
findPattern(
{required String pattern}) → List< int> -
Available on String, provided by the StringExtensions extension
Given a pattern returns the starting indices of all occurrences of thepattern
in theString
. -
first(
[int n = 1]) → String -
Available on String, provided by the StringExtensions extension
Returns the firstn
characters of theString
. -
firstDayOfMonth(
{String? format, String? locale}) → String -
Available on String, provided by the StringExtensions extension
Returns the first day of the month from the providedDateTime
inString
format. -
firstSplit(
Pattern pattern) → string -
Available on String, provided by the StringExtensions extension
Returns the first element after splitting the string using the specifiedpattern
. If the string cannot be split, it returns the original string. -
fixSlash(
[bool? backSlash]) → string -
Available on String, provided by the StringExtensions extension
Reverses slash in theString
, by providingbackSlash
. -
formatWithMask(
String mask, {String specialChar = '#'}) → String -
Available on String, provided by the StringExtensions extension
Inspired from Vincent van Proosdij. -
friendlyTitle(
[bool? forceCase]) → string -
Available on String, provided by the StringExtensions extension
return a string in a friendly format -
getDayFromDate(
{String? format, String? locale}) → String -
Available on String, provided by the StringExtensions extension
Returns the day name of the date provided inString
format. -
getJaro(
String other, [bool caseSensitive = true]) → double -
Available on String, provided by the StringExtensions extension
The Jaro distance is a measure of edit distance between two strings -
getLevenshtein(
String other, [bool caseSensitive = true]) → int -
Available on String, provided by the StringExtensions extension
The Levenshtein distance between two words is the minimum number of single-character -
getMonthFromDate(
{String? format, String? locale}) → String -
Available on String, provided by the StringExtensions extension
Returns the month name of the date provided inString
format. -
hasMatch(
String pattern) → bool -
Available on String, provided by the StringExtensions extension
-
identWith(
int deepLevel, [String identWith = " ", int multiplier = 1]) → String -
Available on String, provided by the StringExtensions extension
Adds indentation to a string based on the specified deep level and indentation characters. -
ifBlank<
S extends string> (S newString) → S -
Available on String, provided by the StringExtensions extension
Returnthis
if not blank. Otherwise returnnewString
. -
indexOfAny(
Iterable< Pattern> patterns, [int start = 0]) → int -
Available on String, provided by the StringExtensions extension
-
insertAt(
int i, String value) → String -
Available on String, provided by the StringExtensions extension
Inserts aString
at the specified index. -
isAnagramOf(
String s) → bool -
Available on String, provided by the StringExtensions extension
Checks whether theString
is an anagram of the providedString
. -
isBetween(
String before, String after) → bool -
Available on String, provided by the StringExtensions extension
-
isIn(
Iterable< String> strings) → bool -
Available on String, provided by the StringExtensions extension
Checks if theString
exists in a givenIterable<String>
-
isLike(
string mask, [bool caseSensitive = false]) → bool -
Available on String, provided by the StringExtensions extension
Checks if a givenvalue
matches amask
pattern. -
isNotIn(
Iterable< String> strings) → bool -
Available on String, provided by the StringExtensions extension
-
last(
[int n = 1]) → String -
Available on String, provided by the StringExtensions extension
Returns the lastn
characters of theString
. -
lastDayOfMonth(
{String? format, String? locale}) → String? -
Available on String, provided by the StringExtensions extension
Returns the last day of the month from the providedDateTime
inString
format. -
lastIndexOfAny(
Iterable< Pattern> patterns, [int? start]) → int -
Available on String, provided by the StringExtensions extension
-
lastSplit(
Pattern pattern) → string -
Available on String, provided by the StringExtensions extension
Returns the last element after splitting the string using the specifiedpattern
. If the string cannot be split, it returns the original string. -
maxChars(
int n) → String -
Available on String, provided by the StringExtensions extension
Trims theString
to have maximumn
characters. -
mostFrequent(
{bool ignoreSpaces = false}) → String -
Available on String, provided by the StringExtensions extension
Finds the most frequent character in theString
. -
nullIfEqual(
String? comparisonString) → String? -
Available on String, provided by the StringExtensions extension
Return null ifthis
equalscomparisonString
. Otherwise returnthis
. -
only(
Iterable< string> chars) → string -
Available on String, provided by the StringExtensions extension
Removes from string all chars thats not inchars
-
prepend(
String? prefix) → String -
Available on String, provided by the StringExtensions extension
Prepends aprefix
to theString
. -
readTime(
{int wordsPerDuration = 200, Duration duration = const Duration(minutes: 1)}) → Duration -
Available on String, provided by the StringExtensions extension
Returns the average read time duration of the givenString
. The default calculation is based on 200 words per minute. -
removeAfter(
String pattern) → String -
Available on String, provided by the StringExtensions extension
Removes everything in theString
after the first match of thepattern
. -
removeAny(
Iterable< Pattern> texts) → String -
Available on String, provided by the StringExtensions extension
-
removeBefore(
String pattern) → String -
Available on String, provided by the StringExtensions extension
Removes everything in theString
before the match of thepattern
. -
removeFirst(
[int n = 1]) → String -
Available on String, provided by the StringExtensions extension
Removes the firstn
characters from theString
. -
removeFirstAndLastAny(
Iterable< String?> patterns) → String -
Available on String, provided by the StringExtensions extension
Continuously removes from the beginning & the end of theString
, any match inpatterns
. -
removeFirstAndLastEqual(
String? pattern) → String -
Available on String, provided by the StringExtensions extension
Removes anypattern
match from the beginning & the end of theString
. -
removeFirstAny(
Iterable< String?> patterns) → String -
Available on String, provided by the StringExtensions extension
Continuously removes from the beginning of theString
any match inpatterns
. -
removeFirstEqual(
String? pattern) → String -
Available on String, provided by the StringExtensions extension
Removes anypattern
match from the beginning of theString
. -
removeLast(
[int n = 1]) → String -
Available on String, provided by the StringExtensions extension
Removes the lastn
characters from theString
. -
removeLastAny(
Iterable< String?> patterns) → String -
Available on String, provided by the StringExtensions extension
Continuously removes from the end of theString
, any match inpatterns
. -
removeLastEqual(
String? pattern) → String -
Available on String, provided by the StringExtensions extension
Removes thepattern
from the end of theString
. -
removeWhere(
bool predicate(String)) → string -
Available on String, provided by the StringExtensions extension
Removes from string chacacters that not match the predicate -
repeat(
[int count = 1]) → String -
Available on String, provided by the StringExtensions extension
Repeats theString
count
times. -
replaceAtIndex(
{required int index, required String replacement}) → String -
Available on String, provided by the StringExtensions extension
Adds areplacement
character atindex
of theString
. -
replaceFirst(
String pattern, String replacement) → String -
Available on String, provided by the StringExtensions extension
Returns a newString
with the first occurrence of the given pattern replaced with the replacementString
. -
replaceLast(
String pattern, String replacement) → String -
Available on String, provided by the StringExtensions extension
Returns a newString
with the last occurrence of the given pattern replaced with the replacementString
. -
replaceMany(
Iterable< Pattern> from, [String to = ""]) → String -
Available on String, provided by the StringExtensions extension
Replaces all occurrences of the givenpattern
with thereplacement
String
. -
replaceMustachesWithList(
Iterable params) → String -
Available on String, provided by the StringExtensions extension
Replaces the placeholders in theString
with the values from the providedparams
list. The placeholders are indexes surrounded by{{
and}}
. -
replaceMustachesWithMap(
Map< String, dynamic> params) → String -
Available on String, provided by the StringExtensions extension
Replaces the placeholders in theString
with the values from the providedparams
map. The placeholders are defined by the{{key}}
format. -
replaceParameters(
JsonRow params, string parameterMatch) → String -
Available on String, provided by the StringExtensions extension
Replaces the placeholders in theString
with the values from the providedparams
list. The placeholders are defined by theparameterMatch
parameter. TheparameterMatch
parameter is aString
that defines the placeholder prefix. -
replaceWrappedWithList(
{required Iterable values, required String openWrapChar, String? closeWrapChar}) → String -
Available on String, provided by the StringExtensions extension
Replaces the placeholders in theString
with the values from the providedvalues
list. The placeholders are indexes surrounded byopenWrapChar
andcloseWrapChar
. -
replaceWrappedWithMap(
{required Map< String, dynamic> values, required String openWrapChar, String? closeWrapChar}) → String -
Available on String, provided by the StringExtensions extension
Replaces the placeholders in theString
with the values from the providedvalues
map. The placeholders are Map keys surrounded byopenWrapChar
andcloseWrapChar
. -
singular(
[string? locale]) → String -
Available on String, provided by the StringExtensions extension
Returns the singular form of a plural noun. -
slice(
int chunkSize) → StringList -
Available on String, provided by the StringExtensions extension
slice a string into slices -
splitAny(
Iterable< String> delimiters, [bool removeEmpty = false]) → List<String> -
Available on String, provided by the StringExtensions extension
Splits the string into multiple substrings using any of the specified delimiters. -
splitChunk(
Iterable< int> chunkSizes) → List<String> -
Available on String, provided by the StringExtensions extension
Splits the string into chunks based on the provided chunk sizes. -
splitFirst(
string pattern) → List< string> -
Available on String, provided by the StringExtensions extension
Splits the string using the specifiedpattern
and returns a list containing the first element and the remaining elements joined by thepattern
. If the string cannot be split, it returns a list containing the original string. -
splitLast(
string pattern) → List< string> -
Available on String, provided by the StringExtensions extension
Splits the string using the specifiedpattern
and returns a list containing the last element and the remaining elements joined by thepattern
. If the string cannot be split, it returns a list containing the original string. -
splitWords(
[WordSplitMode mode = WordSplitMode.wordsOnly]) → List< string> -
Available on String, provided by the StringExtensions extension
Split a string into a list of words and word splitter following the mode -
splitWordsLines(
[WordSplitMode mode = WordSplitMode.wordsOnly]) → Iterable< Iterable< string> > -
Available on String, provided by the StringExtensions extension
First Splits the String into a List of lines, and then split each line into a list of words and word splitters following the mode -
squeeze(
String char) → String -
Available on String, provided by the StringExtensions extension
Squeezes theString
by removing repeats of a given character. -
startsWithAny(
Iterable< String> strings) → bool -
Available on String, provided by the StringExtensions extension
Checks if the string starts with any of the provided strings. Returnstrue
if the string starts with any of the provided strings,false
otherwise. -
swapCase(
) → String -
Available on String, provided by the StringExtensions extension
Swaps the case in theString
. -
toDate(
[string? format, string? locale]) → date -
Available on String, provided by the StringExtensions extension
return a date from string -
toPriceAmount(
{String? currencySymbol, string? locale}) → String -
Available on String, provided by the StringExtensions extension
Tries to format the currentString
to price amount. -
toTitleCase(
[bool? forceCase]) → String -
Available on String, provided by the StringExtensions extension
Converts the string to title case, where the first letter of each word is capitalized. Optionally, the rest of the letters in each word can be forced to lower case. -
trimAny(
Iterable< String?> patterns) → string -
Available on String, provided by the StringExtensions extension
Trims the current string by removing any of the specified patterns from both the start and the end of the string. -
truncateOnWord(
int maxChars, [bool ellipsis = false]) → String -
Available on String, provided by the StringExtensions extension
Truncates the string to a specified maximum number of characters. -
uncommonCharacters(
String otherString, {bool caseSensitive = true, bool includeSpaces = false}) → Set< String> -
Available on String, provided by the StringExtensions extension
Returns a Set of the uncommon characters between the twoString
s. -
wrap(
String? before, [String? after]) → String -
Available on String, provided by the StringExtensions extension
Wraps theString
between two strings. Ifbefore
is a wrap char andafter
is omitted, the method resolveafter
using getOppositeWrap.
Operators
-
operator -(
String? s) → String -
Available on String, provided by the StringExtensions extension
Removes a text from theString
. -
operator /(
int sliceSize) → StringList -
Available on String, provided by the StringExtensions extension
slice a string into slices -
operator <(
String s) → bool -
Available on String, provided by the StringExtensions extension
Checks if the length! of theString
is less than the length ofs
. -
operator <=(
String s) → bool -
Available on String, provided by the StringExtensions extension
Checks if the length! of theString
is less or equal than the length ofs
. -
operator >(
String s) → bool -
Available on String, provided by the StringExtensions extension
Checks if the length! of theString
is more than the length ofs
. -
operator >=(
String s) → bool -
Available on String, provided by the StringExtensions extension
Checks if the length! of theString
is more or equal than the length ofs
.