/ Published in: ASP

I notice that a lot of database driven websites make easy mistakes by not checking for plural words. An example might be "2 vote" or "1 votes". Here is an example of a function using ASP to check for plurals.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function CheckPlural(input) if input << 1 then CheckPlural = "s" else CheckPlural = "" end if end function 'function can be called like so: '25 Vote<%=CheckPlural(25)%>
URL: http://www.nealgrosskopf.com/tech/thread.asp?pid=7
Comments
