Browse Source

Updated documentation for sqimap_find_displayable_name()

antipode 23 years ago
parent
commit
0bf1c173c5
1 changed files with 10 additions and 6 deletions
  1. 10 6
      functions/imap_general.php

+ 10 - 6
functions/imap_general.php

@@ -334,13 +334,17 @@ function sqimap_find_email ($string) {
 
 
 /*
-*  Takes the From: field, and creates a displayable name.
-*    Luke Ehresman <lkehresman@yahoo.com>
-*           becomes:   Luke Ehresman
-*    <lkehresman@yahoo.com>
-*           becomes:   lkehresman@yahoo.com
-*/
+ *  Takes the From: field, and creates a displayable name.
+ *    Luke Ehresman   <lkehresman@yahoo.com>
+ *    "Luke Ehresman" <lkehresman@yahoo.com>
+ *    lkehresman@yahoo.com (Luke Ehresman)
+ *           become:   Luke Ehresman
+ *    <lkehresman@yahoo.com>
+ *           becomes:   lkehresman@yahoo.com
+ */
 function sqimap_find_displayable_name ($string) {
+    $string = trim($string);
+    
     if ( ereg('^(.+)<.*>', $string, $regs) ) {
         $string = ereg_replace ('"', '', $regs[1] );
     }