com.fsck.k9.mail.Address.quoteAtoms()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(1.0k)|赞(0)|评价(0)|浏览(89)

本文整理了Java中com.fsck.k9.mail.Address.quoteAtoms()方法的一些代码示例,展示了Address.quoteAtoms()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Address.quoteAtoms()方法的具体详情如下:
包路径:com.fsck.k9.mail.Address
类名称:Address
方法名:quoteAtoms

Address.quoteAtoms介绍

[英]Quote a string, if necessary, based upon the definition of an "atom," as defined by RFC2822 (http://tools.ietf.org/html/rfc2822#section-3.2.4). Strings that consist purely of atoms are left unquoted; anything else is returned as a quoted string.
[中]如有必要,根据RFC2822定义的“原子”的定义引用字符串(http://tools.ietf.org/html/rfc2822#section-3.2.4). 纯由原子组成的字符串不带引号;其他任何内容都将作为带引号的字符串返回。

代码示例

代码示例来源:origin: k9mail/k-9

@Override
public String toString() {
  if (!TextUtils.isEmpty(mPersonal)) {
    return quoteAtoms(mPersonal) + " <" + mAddress + ">";
  } else {
    return mAddress;
  }
}

代码示例来源:origin: k9mail/k-9

private String quote(final String s) {
    return Address.quoteAtoms(s);
  }
}

代码示例来源:origin: k9mail/k-9

private void noQuote(final String s) {
  assertEquals(s, Address.quoteAtoms(s));
}

相关文章