No Pcase? how do I capitolize the first letter of aword, with the rest of the word lower case?

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default No Pcase? how do I capitolize the first letter of aword, with the rest of the word lower case?

    I know I can go one way or another, Ucase(var) all upppercase, or Lcase(var)
    all lowercase, but how can I get a Propercase? I've seen this in VB, does Cold
    Fusion have a function like this, or can you tell me how to perform this in
    Cold Fusion? I have a user who wants this and doesn't wan't all upper or
    lowercase. Has anyone been able, or know how to do this? Thanks in advance. I
    can't find anything in the forum or dev exchange about it.

    Scooby Doobie Doo Guest

  2. Similar Questions and Discussions

    1. OT--Copperplate & Lower Case
      Years ago, I stumbled across a Copperplate font that actually had a lower case character set with fine serifs and all. Can't remember where I saw it....
    2. Lower case
      Hi, On Wed, 2005-01-26 at 12:01 +0000, Vladimir S. Petukhov wrote: lower(), upper() and case insensitive search highly depend on the correct...
    3. [newbie] upper to lower first letter of a word
      Recently, i get a vintage list (more than 500 items) with poor typo, for example, i've : Côte de beaune-villages instead of : Côte de...
    4. String formatting function - First char Upper, rest lower
      Hi, Newbie question. Does anyone know of a function or script that will capitalize the first char and lowercase the remaining chars of each...
    5. lost lower case type
      nancy, no but don't be embarrased to ask. What I get I a Big capital A and then instead of lower case I get small uppercase. I have been all over...
  3. #2

    Default Re: No Pcase? how do I capitolize the first letter of a word, withthe rest of the word lower case?

    Scooby Doobie Doo wrote:
    > I know I can go one way or another, Ucase(var) all upppercase, or Lcase(var)
    > all lowercase, but how can I get a Propercase? I've seen this in VB, does Cold
    > Fusion have a function like this, or can you tell me how to perform this in
    > Cold Fusion? I have a user who wants this and doesn't wan't all upper or
    > lowercase. Has anyone been able, or know how to do this? Thanks in advance. I
    > can't find anything in the forum or dev exchange about it.
    >
    [url]http://www.cflib.org[/url]

    Lots of string manipulation functions on there.

    --
    Matt Woodward
    [email]mpwoodward@gmail.com[/email]
    Team Macromedia - ColdFusion
    mpwoodward *TMM* Guest

  4. #3

    Default Re: No Pcase? how do I capitolize the first letter of aword, with the rest of the word lower case?

    Use CSS:
    <DIV STYLE="text-transform: capitalize">the first letter of each word will be capitalized</DIV>

    jdeline Guest

  5. #4

    Default Re: No Pcase? how do I capitolize the first letter of aword, with the rest of the word lower case?

    Dude, that rocks! Not sure how I'll convert my CF Vars with that yet, but I'll fudge about with it, I'll also check out the link provided by mpwoodward *TMM*. Thanks guys/gals/peoples! ;)
    Scooby Doobie Doo Guest

  6. #5

    Default Re: No Pcase? how do I capitolize the first letter of aword, with the rest of the word lower case?

    Keeping it within Coldfusion, one could do

    <cfset yourString = "test STRING">
    <cfset result = ReplaceNoCase(LCase(yourString), Left(yourString,"1"),
    UCase(Left(yourString,"1")),"one")>
    <cfoutput>result: #result#</cfoutput>

    BKBK Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139