string manipulation

Results 1 to 5 of 5

Thread: string manipulation

  1. #1
    Join Date
    Dec 1969

    Default string manipulation

    I&#039;m trying to do some string maipulation with names. Example,<BR>If I have &#039;John Survivor&#039; I want to bring back the first letter of the first name and 7 letters of the last name so that the result would look like &#039;JSurvivo&#039;. Any help would be great

  2. #2
    Heaven's Martini Guest

    Default manipulating programmer

    Well,<BR><BR>go to the vbscript docs (left column of page down a ways)<BR><BR>look into the functions<BR><BR>split,len,left,right,substring.<B R><BR>they will lead you to the programmatic euphoria you are after.

  3. #3
    Join Date
    Dec 1969

    Default Easy..

    varfirst = left(firstname,1)<BR>varlast = left(lastname,7)<BR>varname = varfirst & varlast

  4. #4
    Join Date
    Dec 1969

    Default thanks for your help


  5. #5
    Medieval Dude Guest

    Default RE: string manipulation

    Let&#039;s say &#039;John Survivor&#039; is in a variable called FullName and you want to put it into a variable called ShortName. Do this:<BR>ShortName = Left(FullName, 1) & Mid(FullName, Instr(FullName, " ") + 1, 7)

Posting Permissions

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