Unpluralize an English Word
Unpluralize an English word. NOTE: If you find words that are exceptions and not handled correctly, please report them to support@chilkatsoft.com.
<% @CodePage = 65001 %>
<% Response.CodePage = 65001 %>
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>
<body>
<%
set cks = Server.CreateObject("Chilkat_9_5_0.CkString")
' Unpluralize an English word.
' The string must contain a single word and leading/trailing spaces should be trimmed.
cks.Str = "leaves"
cks.Unpluralize
' Prints leaf
Response.Write cks.Str & "<br>"
cks.Str = "components"
cks.Unpluralize
' Prints component
Response.Write cks.Str & "<br>"
cks.Str = "peaches"
cks.Unpluralize
' Prints peach
Response.Write cks.Str & "<br>"
cks.Str = "pennies"
cks.Unpluralize
' Prints penny
Response.Write cks.Str & "<br>"
%>
</body>
</html>
|