commentutil.java
来自「web版的SVN客户端」· Java 代码 · 共 29 行
JAVA
29 行
package org.polarion.svnwebclient.util;
public class CommentUtil {
protected final static String TAG_BR = "<br>";
protected final static String REGEXP = "\\r?\\n";
public static String getFirstLine(String comment) {
String[] mas = comment.split(CommentUtil.REGEXP);
if (mas != null && mas.length > 0) {
return mas[0];
} else {
return null;
}
}
public static String getTooltip(String comment) {
return comment.replaceAll(CommentUtil.REGEXP, CommentUtil.TAG_BR);
}
public static boolean isMultiLine(String comment) {
String str = comment.replaceFirst(CommentUtil.REGEXP, " ");
if (str.equals(comment)) {
return false;
} else {
return true;
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?