📄 codefilter.jsp
字号:
<%!
String Replace(String str_source,String str_original,String str_new) {
if(str_source == null) return null;
StringBuffer output = new StringBuffer();
int lengOfsource = str_source.length();
int lengOfold = str_original.length();
int posStart = 0;
int pos;
while((pos = str_source.indexOf(str_original,posStart)) >= 0) {
output.append(str_source.substring(posStart,pos));
output.append(str_new);
posStart = pos + lengOfold;
}
if(posStart < lengOfsource) {
output.append(str_source.substring(posStart));
}
return output.toString();
}
String toHtml(String s)
{
s = Replace(s,"<","<");
s = Replace(s,">",">");
s = Replace(s,"&","&");
s = Replace(s,"\t"," ");
s = Replace(s,"\r\n","\n");
s = Replace(s,"\n","<br>");
s = Replace(s," "," ");
s = Replace(s,"'","'");
s = Replace(s,"\\","\");
return s;
}
String unHtml(String s)
{
s = Replace(s," "," ");
s = Replace(s,"<br>","\n");
return s;
}
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -