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 givenvalueby 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 theStringif 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 theStringis consisted of same characters (ignores cases).no setter - hasWhitespace → bool
-
Available on String, provided by the StringExtensions extension
Checks whether theStringhas any whitespace characters.no setter - isAscii → bool
-
Available on String, provided by the StringExtensions extension
Checks whether theStringis a valid ASCII string.no setter - isBlank → bool
-
Available on String, provided by the StringExtensions extension
Checks if theStringis 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 theStringis a close wrap char:>,},],",'.no setter - isCreditCard → bool
-
Available on String, provided by the StringExtensions extension
Checks if theStringprovided is a valid credit card number using Luhn Algorithm.no setter - isDate → bool
-
Available on String, provided by the StringExtensions extension
Checks whether theStringis 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 theStringhas only Greek characters.no setter - isGuid → bool
-
Available on String, provided by the StringExtensions extension
Checks whether theStringis 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 theStringis a validjsonformat.no setter - isLatin → bool
-
Available on String, provided by the StringExtensions extension
Checks if theStringhas only Latin characters.no setter - isLettersOnly → bool
-
Available on String, provided by the StringExtensions extension
Returnstrueif theStringcontains only letters (Latin or Greek).no setter - isLowerCase → bool
-
Available on String, provided by the StringExtensions extension
Checks whether theStringis in lowercase.no setter - isMixedCase → bool
-
Available on String, provided by the StringExtensions extension
Checks whether theStringis 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 theStringis 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 theStringis 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 ifStringis a open wrap char:<,{,[,",'.no setter - isPalindrome → bool
-
Available on String, provided by the StringExtensions extension
Checks whether theStringis a palindrome.no setter - isStrongPassword → bool
-
Available on String, provided by the StringExtensions extension
Checks whether theStringcomplies to below rules :no setter - isSwiftCode → bool?
-
Available on String, provided by the StringExtensions extension
Checks whether the providedStringis a valid Swift code.no setter - isUnique → bool
-
Available on String, provided by the StringExtensions extension
Checks whether theStringis consisted of only unique characters.no setter - isUpperCase → bool
-
Available on String, provided by the StringExtensions extension
Checks whether theStringis in uppercase.no setter - isURLOrIP → bool
-
Available on String, provided by the StringExtensions extension
Checks if theStringis 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 theStringadding "" 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 theStringreversed.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 theStringinto aListof 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 theStringin 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 aStringtodoubleif 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 aStringtointif 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 theStringto 1337 alphabet.no setter - toNum → num?
-
Available on String, provided by the StringExtensions extension
Converts aStringto 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 aSizeobject.no setter - toSlugCase → String
-
Available on String, provided by the StringExtensions extension
Returns theStringto slug case.no setter - toSnakeCase → String
-
Available on String, provided by the StringExtensions extension
Returns theStringto 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 aStringafter the first match of thepattern. Thepatternshould not benull. -
addBefore(
String pattern, String adition) → String -
Available on String, provided by the StringExtensions extension
Adds aStringbefore the first match of thepattern. Thepatternshould not benull. -
after(
String char) → String -
Available on String, provided by the StringExtensions extension
Returns the right side of theStringstarting fromchar. -
append(
String? suffix) → String -
Available on String, provided by the StringExtensions extension
Appends asuffixto theString. -
applyXorEncrypt(
String key) → String -
Available on String, provided by the StringExtensions extension
Applies XOR operation between thethisstring and thekeystring. -
asIf(
bool comparison(String?), String? trueString, String? falseString) → String? -
Available on String, provided by the StringExtensions extension
Comparesthisusingcomparisonand returnstrueStringif true, otherwise returnfalseString. -
before(
String char) → String -
Available on String, provided by the StringExtensions extension
Returns the left side of theStringstarting fromchar. -
between(
String before, String after) → String -
Available on String, provided by the StringExtensions extension
Returns the text betweenbeforeandafterstrings. -
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 atindexof theString. -
commonCharacters(
String otherString, {bool caseSensitive = true, bool sort = true, bool includeSpaces = false}) → Set< String> -
Available on String, provided by the StringExtensions extension
Returns aSetof the common characters between the twoStrings. -
containsAll(
Iterable< string?> patterns) → bool -
Available on String, provided by the StringExtensions extension
Checks if theStringmatches 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 theStringmatches 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 emptyStringifthisequalscomparisonString. 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. Returnstrueif the string ends with any of the provided strings,falseotherwise. -
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 thepatternin theString. -
first(
[int n = 1]) → String -
Available on String, provided by the StringExtensions extension
Returns the firstncharacters 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 providedDateTimeinStringformat. -
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 inStringformat. -
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 inStringformat. -
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
Returnthisif 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 aStringat the specified index. -
isAnagramOf(
String s) → bool -
Available on String, provided by the StringExtensions extension
Checks whether theStringis 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 theStringexists in a givenIterable<String> -
isLike(
string mask, [bool caseSensitive = false]) → bool -
Available on String, provided by the StringExtensions extension
Checks if a givenvaluematches amaskpattern. -
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 lastncharacters 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 providedDateTimeinStringformat. -
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 theStringto have maximumncharacters. -
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 ifthisequalscomparisonString. 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 aprefixto 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 theStringafter 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 theStringbefore the match of thepattern. -
removeFirst(
[int n = 1]) → String -
Available on String, provided by the StringExtensions extension
Removes the firstncharacters 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 anypatternmatch 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 theStringany match inpatterns. -
removeFirstEqual(
String? pattern) → String -
Available on String, provided by the StringExtensions extension
Removes anypatternmatch from the beginning of theString. -
removeLast(
[int n = 1]) → String -
Available on String, provided by the StringExtensions extension
Removes the lastncharacters 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 thepatternfrom 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 theStringcounttimes. -
replaceAtIndex(
{required int index, required String replacement}) → String -
Available on String, provided by the StringExtensions extension
Adds areplacementcharacter atindexof theString. -
replaceFirst(
String pattern, String replacement) → String -
Available on String, provided by the StringExtensions extension
Returns a newStringwith 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 newStringwith 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 givenpatternwith thereplacementString. -
replaceMustachesWithList(
Iterable params) → String -
Available on String, provided by the StringExtensions extension
Replaces the placeholders in theStringwith the values from the providedparamslist. 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 theStringwith the values from the providedparamsmap. 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 theStringwith the values from the providedparamslist. The placeholders are defined by theparameterMatchparameter. TheparameterMatchparameter is aStringthat 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 theStringwith the values from the providedvalueslist. The placeholders are indexes surrounded byopenWrapCharandcloseWrapChar. -
replaceWrappedWithMap(
{required Map< String, dynamic> values, required String openWrapChar, String? closeWrapChar}) → String -
Available on String, provided by the StringExtensions extension
Replaces the placeholders in theStringwith the values from the providedvaluesmap. The placeholders are Map keys surrounded byopenWrapCharandcloseWrapChar. -
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 specifiedpatternand 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 specifiedpatternand 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 theStringby 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. Returnstrueif the string starts with any of the provided strings,falseotherwise. -
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 currentStringto 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 twoStrings. -
wrap(
String? before, [String? after]) → String -
Available on String, provided by the StringExtensions extension
Wraps theStringbetween two strings. Ifbeforeis a wrap char andafteris omitted, the method resolveafterusing 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 theStringis less than the length ofs. -
operator <=(
String s) → bool -
Available on String, provided by the StringExtensions extension
Checks if the length! of theStringis less or equal than the length ofs. -
operator >(
String s) → bool -
Available on String, provided by the StringExtensions extension
Checks if the length! of theStringis more than the length ofs. -
operator >=(
String s) → bool -
Available on String, provided by the StringExtensions extension
Checks if the length! of theStringis more or equal than the length ofs.