forked from maxliaops/Java_Web_Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchStr.java
More file actions
48 lines (42 loc) · 1.08 KB
/
chStr.java
File metadata and controls
48 lines (42 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
// Source File Name: chStr.java
package beans;
public class chStr
{
public chStr()
{
}
public String chStr(String str)
{
if(str == null)
str = "";
else
try
{
str = (new String(str.getBytes("iso-8859-1"), "GB2312")).trim();
}
catch(Exception e)
{
e.printStackTrace(System.err);
}
return str;
}
public String convertStr(String str1)
{
if(str1 == null)
str1 = "";
else
try
{
str1 = str1.replaceAll(" ", " ");
str1 = str1.replaceAll("\r\n", "<br>");
}
catch(Exception e)
{
e.printStackTrace(System.err);
}
return str1;
}
}