convertdbstr.java.svn-base
来自「一个timesheet程序,用来统计开发人员的度量衡web在线程序.用于软件行业」· SVN-BASE 代码 · 共 48 行
SVN-BASE
48 行
package com.nsi.util;
/**
* Insert the type's description here. Creation date: (7/17/2001 10:13:59 AM)
*
* @author: Chris Ye
*/
public final class ConvertDBstr
{
/**
* private constructor of ConvertDBstr, prevent instantiation
*/
private ConvertDBstr()
{
}
private static class ConvertDBstrHolder
{
static final ConvertDBstr convertDBstr = new ConvertDBstr();
}
/**
* @return an instance of ConvertDBstr
*/
public static ConvertDBstr getInstance()
{
return ConvertDBstrHolder.convertDBstr;
}
/**
* @return java.lang.String
* @param sFront java.lang.String
*/
public String convertDBstr(String sFront)
{
String sDBstr = "";
int i = sFront.indexOf("'") + 1;
if(i == 0)
{
sDBstr = sDBstr + sFront;
}
else
{
sDBstr = sDBstr + sFront.substring(0, i) + "'";
sFront = sFront.substring(i);
sDBstr = sDBstr + convertDBstr(sFront);
}
return sDBstr.trim();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?