Results 1 to 3 of 3

Thread: lcase

  1. #1
    Join Date
    Dec 1969

    Default lcase

    I am trying to give each word returned from a database a capitalized first letter. At the moment all letters are capitalized in the database. Im applying the following code to turn them back to lowercase but i would prefer to have the correct case i.e. first letter of each word to be capitalised.<BR><BR> Response.Write lcase(myRS("homeloc"))<BR><BR>any ideas<BR>thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: lcase

    NewString = UCase (Mid(1, string, 1)) & LCase(Mid(2, string,Len(string)-1))<BR><BR>try that!<BR><BR>Jason<BR>

  3. #3
    LeeAnnie Guest

    Default RE: lcase

    try...<BR><BR>str = myRS("homeloc")<BR>newStr = ""<BR>for each word in split(str," ")<BR>newStr = newStr & uCase(left(str,1) & lCase(right(str(len(str)-1))) & " "<BR>next<BR><BR>This will capitalize all words in the string.<BR>newStr = trim(newStr) &#039;remove any extra spaces

Posting Permissions

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