Using ProperCase in ASP

Discussion in 'ASP General' started by Mike, Jul 11, 2003.

  1. Mike

    Mike Guest

    I'm having problem using strConv("john", 3) to generate a
    propercase version of john.

    does strConv not work in ASP???

    Any advise is greatly appreciated.

    Thanks,
    Mike
    Mike, Jul 11, 2003
    #1
    1. Advertising

  2. Mike

    Ray at Guest

    I guess you mean in VB Script, right? If so, no.

    String functions that exist in VB but not VBS:

    Fixed-length strings
    LSet, RSet
    Mid Statement
    StrConv

    See here though. http://www.aspfaq.com/show.asp?id=2299

    Ray at work


    "Mike" <> wrote in message
    news:029501c347d1$ba544e10$...
    > I'm having problem using strConv("john", 3) to generate a
    > propercase version of john.
    >
    > does strConv not work in ASP???
    >
    > Any advise is greatly appreciated.
    >
    > Thanks,
    > Mike
    Ray at, Jul 11, 2003
    #2
    1. Advertising

  3. "Aaron Bertrand - MVP" <> wrote in message
    news:...
    > > Mid Statement

    >
    > Not true! I use mid() in ASP all the time...
    >
    >

    I think the operative word here is "statement". The Mid Statement in VB
    actual modifies the input string. Sort of a positional replacer. No such
    animal exists in VBScript. Ray's phrasing was somewhat misleading, but
    to eer is human, ... Perhaps he should have said string "things" not in
    VBScript.

    -Chris

    P.S. Yes, I purposely misplet err. Funny no?
    P.S.S Yes misplet is misspelled. Now that's damn funny!
    Chris Hohmann, Jul 11, 2003
    #3
  4. Mike

    Evertjan. Guest

    Re: Using ProperCase in ASP - NEVERMIND

    Mike wrote on 11 jul 2003 in microsoft.public.inetserver.asp.general:

    > FName = UCASE(Left(FName,1)) & LCASE(RIGHT(FName, Len
    > (FName)-1))



    FName = Ucase(Left(FName,1)) & Lcase(Mid(FName,2))


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Jul 11, 2003
    #4
  5. Mike

    Ray at Guest

    Tru dat. ;] I also use the Mid function all the time, but not the Mid
    statement.

    Ray at home

    "Chris Hohmann" <hohmannATyahooDOTcom> wrote in message
    news:%...
    > "Aaron Bertrand - MVP" <> wrote in message
    > news:...
    > > > Mid Statement

    > >
    > > Not true! I use mid() in ASP all the time...
    > >
    > >

    > I think the operative word here is "statement". The Mid Statement in VB
    > actual modifies the input string. Sort of a positional replacer. No such
    > animal exists in VBScript. Ray's phrasing was somewhat misleading, but
    > to eer is human, ... Perhaps he should have said string "things" not in
    > VBScript.
    >
    > -Chris
    >
    > P.S. Yes, I purposely misplet err. Funny no?
    > P.S.S Yes misplet is misspelled. Now that's damn funny!
    >
    >
    Ray at, Jul 11, 2003
    #5
  6. Mike

    Marc Guest

    Re: Using ProperCase in ASP - The "Easy" way

    Function Capital(S)
    ReDim c(Len(S))
    i = 1
    Do Until i = Len(S) + 1
    c(i) = Mid(S, i, 1)
    i = i + 1
    Loop
    c(1) = UCase(c(1))
    j = 2
    Do Until j = UBound(c) + 1
    b = b & c(j)
    j = j + 1
    Loop
    Capital = c(1) & b
    End Function

    Response.Write Capital("easy")

    ;-)

    "Evertjan." <> wrote in message
    news:Xns93B5D11FA4E61eejj99@194.109.133.29...
    > Mike wrote on 11 jul 2003 in microsoft.public.inetserver.asp.general:
    >
    > > FName = UCASE(Left(FName,1)) & LCASE(RIGHT(FName, Len
    > > (FName)-1))

    >
    >
    > FName = Ucase(Left(FName,1)) & Lcase(Mid(FName,2))
    >
    >
    > --
    > Evertjan.
    > The Netherlands.
    > (Please change the x'es to dots in my emailaddress)
    Marc, Jul 12, 2003
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. telescient telescient via .NET 247

    How to transform xml variable to xsl file using asp.net using vb.net

    telescient telescient via .NET 247, Apr 4, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    836
    Matt Berther
    Apr 4, 2005
  2. Kabal

    ProperCase class <see body>

    Kabal, Sep 3, 2003, in forum: Java
    Replies:
    5
    Views:
    2,896
    Wojtek
    Sep 5, 2003
  3. senthil
    Replies:
    0
    Views:
    888
    senthil
    Oct 12, 2007
  4. Colin Steadman

    Something more than Propercase

    Colin Steadman, Dec 12, 2003, in forum: ASP General
    Replies:
    1
    Views:
    121
    Matt Smith
    Dec 12, 2003
  5. ADvantage
    Replies:
    1
    Views:
    240
Loading...

Share This Page