![]() |
|
|
+ Search |
![]()
|
Jul 23rd, 2000 00:30
unknown unknown, ASPfreeforall, Phil Smith, Jamie Dearnley
You mean like, UCase(Left(TheInput, 1)) ? ----------- This little gem will cap the first letter of every word. "this is a great movie!" becomes "This Is A Great Movie!" <% ' http://www.ultimateasp.com/free/fs.asp Function ConvertCap(txt) tmp = Split(txt, " ") For Each Item In tmp ConvertCap = ConvertCap & UCase(Left(Item, 1)) & LCase(Right(Item, Len(Item) - 1)) & " " Next ConvertCap = Left(ConvertCap, Len(ConvertCap) - 1) End Function test = "this is a great movie!" result = ConvertCap(test) Response.Write result %> -------------- you can use stylesheets to capitalise, but for it to work all the text must be lower case: style='text-transform: capitalize;'
© 1999-2004 Synop Pty Ltd