Return to Snippet

Revision: 5642
at March 21, 2008 15:37 by neal_grosskopf


Initial Code
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)%>

Initial URL
http://www.nealgrosskopf.com/tech/thread.asp?pid=7

Initial Description
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.

Initial Title
Checking Plurals With ASP - A Simple Check Plural Function

Initial Tags
function, ASP

Initial Language
ASP