View the DQSD CVS repository here:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dqsd/
Update of /cvsroot/dqsd/dqsd/searches
In directory sc8-pr-cvs1:/tmp/cvs-serv3430/searches
Added Files:
ccase.xml
Log Message:
added Change Case function - ccase.xml - from Sarah Sweeney
--- NEW FILE: ccase.xml ---
<search function="ccase">
<name>Change case</name>
<description>
Change case of string to capitalized, lowercase, or uppercase.<br/>
<div class="helpboxDescLabels">Switches:</div>
<table class="helpboxDescTable">
<tr><td>/capitalize</td><td>Capitalize the first letter, lowercase the
rest of each word.</td></tr>
<tr><td>/lowercase</td><td>Lowercase all words</td></tr>
<tr><td>/uppercase</td><td>Uppercase all words</td></tr>
</table>
<div class="helpboxDescLabels">Example:</div>
<table class="helpboxDescTable">
<tr><td>Capitalize:</td><td>ccase Today is a Monday.</td></tr>
<tr><td>Capitalize:</td><td>ccase /c Today is a Monday.</td></tr>
<tr><td>Lowercase:</td><td>ccase /l Today is a Monday.</td></tr>
<tr><td>Uppercase:</td><td>ccase /u Today is a Monday.</td></tr>
</table>
</description>
<category>Functions</category>
<contributor>Sarah Sweeney</contributor>
<email>[EMAIL PROTECTED]</email>
<script><![CDATA[
function capitalizeCase(str)
{ temp = "";
words = str.split(" ");
if (words.length > 0)
{ for (i = 0; i < words.length; i++)
{ if (temp != "") temp += " ";
word = words[i];
first = word.charAt(0);
first = first.toUpperCase();
rest = word.slice(1,word.length).toLowerCase();
temp = temp + first + rest;
}
}
return temp;
}
function lowerCase(str)
{ return str.toLowerCase();
}
function upperCase(str)
{ return str.toUpperCase();
}
function ccase(q, switches)
{ if (nullArgs("ccase", q)) return false;
var args = parseArgs(q, "capitalize, lowercase, uppercase");
str = "";
if (args.switches.length > 0) {
switch (args.switches[0].name)
{ case "lowercase":
str = lowerCase(args.q);
break;
case "uppercase":
str = upperCase(args.q);
break;
case "capitalize":
str = capitalizeCase(args.q);
break;
default:
str = capitalizeCase(args.q);
break;
}
}
else str = capitalizeCase(args.q);
setSearchWindowText(str, true);
}
]]></script>
<copyright>
Copyright (c) 2002 David Bau
Distributed under the terms of the
GNU Public License, Version 2 (http://www.gnu.org/copyleft/gpl.txt)
</copyright>
</search>
-------------------------------------------------------
This SF.NET email is sponsored by: Take your first step towards giving
your online business a competitive advantage. Test-drive a Thawte SSL
certificate - our easy online guide will show you how. Click here to get
started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en
_______________________________________________
DQSD-CVS mailing list
https://lists.sourceforge.net/lists/listinfo/dqsd-cvs
DQSD CVS repository:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dqsd/