anchor.diff:  }
   
   
  -// convert the input to a date, or null if the input is not a date
  +/// convert the input to a date, or null if the input is not a date
   DateTime toDate(String str) {
     try {
       return DateTime.parse(str);
  
positive.code: }
  
  
  // trim characters (whitespace by default) from both sides of the input
  String trim(String str, [String chars]) {
    RegExp pattern = (chars != null) ? new RegExp('^[$chars]+|[$chars]+\$') : new RegExp(r'^\s+|\s+$');
    return str.replaceAll(pattern, '');
  }
  
  
  // trim characters from the left-side of the input
  String ltrim(String str, [String chars]) {
    var pattern = chars != null ? new RegExp('^[$chars]+') : new RegExp(r'^\s+');
    return str.replaceAll(pattern, '');
  }
  
  
  // trim characters from the right-side of the input
  String rtrim(String str, [String chars]) {
    var pattern = chars != null ? new RegExp('[$chars]+\$') : new RegExp(r'\s+$');
    return str.replaceAll(pattern, '');
  }
  
  
  // remove characters that do not appear in the whitelist
  String whitelist(String str, String chars) {
    return str.replaceAll(new RegExp('[^' + chars + ']+'), '');
  }
  
  
  // remove characters that appear in the blacklist
  String blacklist(String str, String chars) {
    return str.replaceAll(new RegExp('[' + chars + ']+'), '');
  }
  
  
  // remove characters with a numerical value < 32 and 127
  String stripLow(String str, [bool keep_new_lines]) {
    String chars = keep_new_lines == true ? '\x00-\x09\x0B\x0C\x0E-\x1F\x7F' : '\x00-\x1F\x7F';
    return blacklist(str, chars);
  }
  
  
  // replace <, >, &, ' and " with HTML entities
  String escape(String str) {
    return (str.replaceAll(new RegExp(r'&'), '&amp;')
               .replaceAll(new RegExp(r'"'), '&quot;')
  
negative.code: }
  
  
  /// convert the input to a boolean Everything except for '0', 'false' and ''
  /// returns true. In [strict] mode only '1' and 'true' return true.
  bool toBoolean(String str, [bool strict]) {
    if (strict == true) {
      return str == '1' || str == 'true';
  