--- views_handler_filter_string.inc	2009-03-19 00:14:11.000000000 +0200
+++ views_handler_filter_string.inc	2009-03-19 00:13:58.000000000 +0200
@@ -72,6 +72,18 @@ class views_handler_filter_string extend
         'method' => 'op_not',
         'values' => 1,
       ),
+      'shorterthan' => array(
+        'title' => t('Length is shorter than'),
+        'short' => t('shorter than'),
+        'method' => 'op_shorter',
+        'values' => 1,
+      ),
+      'longerthan' => array(
+        'title' => t('Length is longer than'),
+        'short' => t('longer than'),
+        'method' => 'op_longer',
+        'values' => 1,
+      ),
     );
     // if the definition allows for the empty operator, add it.
     if (!empty($this->definition['allow empty'])) {
@@ -268,6 +280,14 @@ class views_handler_filter_string extend
   function op_not($field, $upper) {
     $this->query->add_where($this->options['group'], "$upper(%s) NOT LIKE $upper('%%%s%%')", $field, $this->value);
   }
+  
+  function op_shorter($field, $upper) {
+    $this->query->add_where($this->options['group'], "LENGTH($upper(%s)) < %d", $field, $this->value);
+  }
+
+  function op_longer($field, $upper) {
+    $this->query->add_where($this->options['group'], "LENGTH($upper(%s)) > %d", $field, $this->value);
+  }
 
   function op_empty($field) {
     if ($this->operator == 'empty') {
