function strLen(s)
{
var i
str
nLen =
for(i=
{
str
str
if(str
{
nLen = nLen +
}
else
{
nLen = nLen +
}
}
return nLen;
}
function Replace(s
{
var len
var str
str
len
len
if (len
return s
for (i=
{
str
if (str
{
str
i =
len
}
}
return str
}
function Pos(s
{
var len
var str
str
len
len
if (len
return
flag = false;
if (len
return s
for (i=
{
str
if (str
{
flag = true;
break;
}
}
if (flag)
return i;
else
return
}
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/19122.html