diff --git a/pgpainless-core/src/main/java/org/pgpainless/key/util/UserId.java b/pgpainless-core/src/main/java/org/pgpainless/key/util/UserId.java index 6dca06b5..3c43b92c 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/key/util/UserId.java +++ b/pgpainless-core/src/main/java/org/pgpainless/key/util/UserId.java @@ -69,6 +69,24 @@ public final class UserId implements CharSequence { } } + /** + * Parse a {@link UserId} from free-form text,
name-addr
or
mailbox
string and split it + * up into its components. + * Example inputs for this method: + * + * In these cases, {@link #parse(String)} will detect email addresses, names and comments and expose those + * via the respective getters. + * + * @see RFC5322 ยง3.4. Address Specification + * @param string user-id + * @return parsed {@link UserId} object + */ public static UserId parse(@Nonnull String string) { Builder builder = newBuilder(); string = string.trim();