[英]Java - how to add dot character like in a HTML unordered list
Is there a possibility to parse String in Java in such a way that there is a dot char like: 是否有可能以这样的方式解析Java中的String:
I'd like to have unordered list in my String to generate email from this String. 我想在我的字符串中包含无序列表,以便从该字符串生成电子邮件。
My String look like 我的弦看起来像
private static final String ACCEPT_AUTH_APPLICATION_MSG = "lorem ipsum " +
"lorem ipsum.\n\n" +
"lorem ipsum:\n"(below my unordered list with dots)
Thank you in advice! 谢谢指教! Matthew 马修
As @Dom said in the comment, it is good enough to use the unicode encoding for the bullet character. 就像@Dom在评论中说的那样,对项目符号字符使用unicode编码就足够了。
public class Test {
public static void main(String[] args) {
System.out.println("\u2022 List item");
}
}
Output is exactly: 输出正好是:
• List item
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.