SitePoint Sponsor

User Tag List

Results 1 to 14 of 14
  1. #1
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    ASP: First letter of a string in caps

    How would I do it so the first letter in a string is capitalized?

    Preferably a function would be nice, but I need to check how to call a function with you guys as well

    Call funcname(param)

    is the code, right?

    So, if someone could write this quick function for me (I just can't remember how to do string parsing all taht well, this will be a quick update).

    fyi:
    param name: name

    Thanx so much all
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  2. #2
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    addendum: No need for a func that does it... just doing it would be fine...
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  3. #3
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    here ya go sunny its prolly complete crap, but it works, and i guess some1 will post a better one

    Code:
    function makeCap(str)
    	fLetter = left(str, 1)
    	fLetter = uCase(fLetter)
    	makeCap = fLetter & right(str, (len(str) - 1))
    end function
    response.write(makeCap("testing"))
    hope thats what u want

  4. #4
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    sooo close

    Thanx for both funcs (I've started a functions.asp include)

    I need the first to be caps, and the rest to be lcase. It's my fault, I didn't specify that...

    I'm assuming it would be something like:

    length=Len(str)
    rest=right(str,length-1)

    or something...
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  5. #5
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    so u would want, testing to come out as Testing? if so, thats what it does...

  6. #6
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    More like... if someone inputted:

    teStInG

    It would come out as: Testing.

    Reason being for first and last names going into the db (don't worry, different fields) they need to be structured identically...
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  7. #7
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    function makeCap(str)
    	fLetter = left(str, 1)
    	fLetter = uCase(fLetter)
    	makeCap = fLetter & right(lCase(str), (len(str) - 1))
    end function
    response.write(makeCap("testing"))

  8. #8
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Great thanx mate

    I'll let you know when this new project is up and running
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  9. #9
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i need a favour sunny, i need pics of multimedia equipment, ie. video cameras, digital camera, comptuers, etc etc. im looking on photodics right now, but i need more. ive been asked to do a design

    please help me!! ive got one in my head, i jus need images

  10. #10
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Well, what do you want?

    I mean, photodisc is the best for this kinda stuff, but if you have an idea what you want specifically I can run over and take pictures of the equipment (5 camera shoot happening that I refuse to be involved in).
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  11. #11
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    awwwww is sunny shy of the camera! :P

    its ok, i found everything i was looking for... so ill show u the design as i move along with it...

    ohohoh, there is one thing, remember with ur eye contest, the first one that blaine one with the wires? if u remember, and still that image, can u mail it to me?

  12. #12
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I hate the way I look *L* But I'm not shy of the camera, just would rather be doing this stuff then doing sound mixing or operating a 50K camera

    Oh, the EC is still online @ www.studiococo.com/old/eyecandy.shtml
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  13. #13
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks

  14. #14
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    No worries, you know I'm here when you need me
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright


Bookmarks

Posting Permissions

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