Sunday, May 13, 2007

Remove Upper Chars from String

Function in javascript that uses toUpperCase and removes all upper chars from the input string.

function fRemoveUpperChars(src)
{
var dst = "";
var c = "";

for (var i = 0; i < src.length; i++)
{
c = src.charAt(i);
if (c != c.toUpperCase())
{
dst += c;
}
}

return dst;
}

No comments: