Skip to main content
Inspiring
March 13, 2008
Answered

Capitalise first word of a sentence

  • March 13, 2008
  • 2 replies
  • 779 views
Hi I was looking for a function/method of capitalising only the first word of a string. (not every word in the string as capfirst function does very nicely)

thanks

Oli
    This topic has been closed for replies.
    Correct answer oli_from_the_valley
    many thanks, just the job, maye I should have thought of that, not rocket science, doh!

    2 replies

    tclaremont
    Inspiring
    March 13, 2008
    #UCASE(Left(StringName,1))##Mid(StringName,2,50000)#
    oli_from_the_valleyAuthorCorrect answer
    Inspiring
    March 13, 2008
    many thanks, just the job, maye I should have thought of that, not rocket science, doh!
    Inspiring
    March 13, 2008
    Did you search cflib.org?
    Inspiring
    March 13, 2008
    Yes, but not quite what I need, as I just weant to capitalise the first word

    CapFirst
    Capitalizes the first letter in each word.
    Requires: ColdFusion MX

    CapFirstTitle
    Returns a string with words capitalized for a title.
    Requires: ColdFusion 5