Feelm

Version
Version Coverage Status


Current Methods

  • isGuid()
String foo = '6d64-4396-8547-1ec1b86e081e'
bool isGuid = foo.isGuid() // returns false
String foo = '887b7923-6d64-4396-8547-1ec1b86e081e'
bool isGuid = foo.isGuid() // returns true
  • isMail()
String foo = 'esentis@esentis.com'
bool isMail = foo.isMail() // returns true
String foo = 'esentis@esentis'
bool isMail = foo.isMail() // returns false
  • isIpv4()
String foo = '192.168.1.14';
bool isIpv4 = foo.isIpv4(); // returns true
String foo = '192.168.1.14.150.1225';
bool isIpv4 = foo.isIpv4(); // returns false
  • isIpv6()
String foo = '2001:0db8:85a3:0000:0000:8a2e:0370:7334';
bool isIpv6 = foo.isIpv6(); // returns true
String foo = '92.168.1.14';
bool isIpv6 = foo.isIpv6(); // returns false
  • isNumber()
String foo = '44';
bool isNumber = foo.isNumber(); // returns true
String foo = '92.168.1.14';
bool isNumber = foo.isNumber(); // returns false
  • toStringArray()
String foo = 'abracadabra';
List<String> fooArray = foo.toStringArray(); // returns '[a,b,r,a,c,a,d,a,b,r,a]'
  • toCamelCase()
String foo = 'Find max of array';
String camelCase = foo.toCamelCase() // returns 'findMaxOfArray'
  • toTitleCase()
String foo = 'hello world';
String fooTitled = foo.toTitleCase(); // returns 'Hello World'
  • toSlug()
String foo = 'hello world';
String fooSlug = foo.toSlug(); // returns 'hello_world'
  • onyLetters()
String foo = '4*%^55/es4e5523nt1is';
String letters = foo.onlyLetters() // returns 'esentis';
  • onlyNumbers()
String foo = '4*%^55/es4e5523nt1is';
String onyNumbers = foo.onlyNumbers() // returns '455455231'
  • readTime()
String foo =  'Hello dear friend how you doing ?';
int readTime = foo.readTime() // returns 3 seconds.
  • removeNumbers()
String foo = 'es4e5523nt1is';
String noNums = foo.removeNumbers() // returns 'esentis'
String foo = '1244e*s*4e*5523n*t*1i*s'
String noNums = foo.removeNumbers() // returns 'e*s*e*n*t*i*s'
  • countWords()
String foo = 'Hello dear friend how you doing ?';
int count = foo.countWords() // returns 7 words.
  • capitalize()
String foo = 'hAckErrR';
String cFoo = foo.capitalize(); // returns 'Hackerrr'.
  • removeLetters()
String foo = 'es4e5523nt1is';
String noLetters = foo.removeLetters() // returns '455231'
String foo = '1244e*s*4e*5523n*t*1i*s'
String noLetters = foo.removeLetters() // returns '1244**4*5523**1*'
  • charOccurences()
String foo = 'esentis';
List occurences = foo.charOccurences() // returns '[{e:2},{i:1},{n:1},{s:2},]'
  • mostFrequent()
String foo = 'Hello World';
String mostFrequent = foo.mostFrequent() // returns 'l'
  • reverse()
String foo = 'Hello World';
String reversed = foo.reverse() ; // returns 'dlrow olleH'
  • first()
String foo = 'hello world';
String firstChars = foo.first(); // returns 'h'
  • last()
String foo = 'hello world';
String lastChars = foo.last(); // returns 'd'
  • replaceGreek()
 String foo = 'Αριστοτέλης';
 String fooReplaced = foo.replaceGreek(); // returns 'aristotelis'
  • findPatterns({required String pattern})
String foo = 'abracadabra';
String fooOccs = foo.findPattern(pattern:'abr'); // returns '[0, 7]'
  • stripHtml()
String html = '<script>Hacky hacky.</script> <p>Here is some text. <span class="bold">This is bold. </span></p>';
String stripped = foo.stripHtml(); // returns 'Hacky hacky. Here is some text. This is bold.'
  • repeat(int x)
String string = 'foo';
String stripped = foo.repeat(2); // returns 'foofoo'

Libraries

string_extensions