|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.sandev.ui.util.TextUtil
public class TextUtil
Text manipulation utilities.
| Constructor Summary | |
|---|---|
TextUtil()
|
|
| Method Summary | |
|---|---|
static void |
checkForMisses(EmailAddress ea,
java.util.ArrayList al)
If our text had an email with no atsign in it, then it will end up stuck to one of the names. |
static java.lang.String |
cleanName(java.lang.String rawname)
Given a name, clean up any known extraneous characters and return the result. |
static EmailAddress |
getEmailFromText(java.lang.String text)
Read the given text to extract a single email address. |
static EmailAddress[] |
getEmailsFromText(java.lang.String text)
Parse the email addresses out of the given text and return them as an array of EmailAddress instances. |
static boolean |
isValidEmailAddressChar(char ch)
Return true if the given character is valid in an email address on either side of the atSign, false otherwise. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TextUtil()
| Method Detail |
|---|
public static EmailAddress[] getEmailsFromText(java.lang.String text)
This method breaks the address text into separate strings with one email address per string, then calls through to the single email address get method. To locate each email address we search forward for a '@' and then search forward again while we have valid email characters. So terminating delimiters end up at the start of the next token. If a Logger is given, then the parsed
Valid email address characters are letters, numbers, '.', '_' and '-'. Everything else is email client specific extensions. Different clients also use different address separators for writing multiple addresses on one line. Commas and semicolons are both in common use as separators, as are newlines and whitespace.
public static EmailAddress getEmailFromText(java.lang.String text)
public static java.lang.String cleanName(java.lang.String rawname)
public static boolean isValidEmailAddressChar(char ch)
public static void checkForMisses(EmailAddress ea,
java.util.ArrayList al)
known cases:
local list <local list>, real name
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||