SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Apr 2000
    Location
    Cupertino,CA,95014
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    string convertion

    User Edward Dias (dsd_hca@hotmail.com) posted:

    ------=_NextPart_001_0000_01C0B873.0178FCF0
    Content-Type: text/plain; charset="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable

    Hi all,


    I need a little help to convert this string that i capture form the about w=
    indow and convert it to something that i can name a directory after prefera=
    bly the second string if possible. Your help is appreciated.

    STRING sCapture =3D "Version: 1.13 (build 15)"

    STRING sDirName =3D "version_1_13_15"


    [This message has been edited by AJ (edited 04-01-2001).]

  2. #2
    SQA Knight
    Join Date
    Jul 1999
    Location
    Grand Rapids, MI
    Posts
    3,727
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: string convertion

    Edward,

    Attached is *.inc file with two functions I use to extract string patterns from another string. While not as good as regular expression processing in Unix-land they should get the job done for you.

    The file was uploaded as a Silk *.inc formatted file, even though it got converted by this board to a *.txt file.

    -fyi, Terry Horwath

    P.S. Please use a regular mail tool and not one that puts advertising crap in HTML inline when posting to this board. It is visual static.


    ------------------

  3. #3
    Senior Member
    Join Date
    Jul 1999
    Location
    Burlingame CA 94010
    Posts
    502
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: string convertion

    User John Green (jwgreen@automationexpertise.com) posted:

    Here's a function to do what you are asking. Hope this helps

    [-] main ()
    [ ] STRING sCapture = "Version: 1.13 (build 15)"
    [ ]
    [ ] file://STRING sDirName = "version_1_13_15"
    [ ]
    [ ] STRING sNew = BuildNameFromVersion (sCapture)
    [ ]
    [ ]
    [ ]
    [-] BuildNameFromVersion (STRING sInput)
    [ ] STRING sTemp
    [ ]
    [ ] // CHANGE ': ' TO '_'
    [ ] sTemp = StrTran (sInput, ": ", "_")
    [ ]
    [ ] // CHANGE '.' TO '_'
    [ ] sTemp = StrTran (sTemp, ".", "_")
    [ ]
    [ ] // CHANGE ' (build ' to '_'
    [ ] sTemp = StrTran (sTemp, " (build ", "_")
    [ ]
    [ ] // CHANGE ')' TO ''
    [ ] sTemp = StrTran (sTemp, ")", "")
    [ ]
    [ ] return sTemp
    [ ]

    John Green
    President/CEO
    Automation Expertise Inc
    Email: jwgreen@automationexpertise.com
    Web: www.automationexpertise.com
    Phone: (650) 245-6555
    Fax: (650) 570-6033
    ---------------------------------------------------------------
    "It's a matter of eQuality"

    -----Original Message-----
    From: Edward Dias [mailto:dsd_hca@hotmail.com]
    Sent: Thursday, March 29, 2001 5:09 PM
    To: SilkTestGroup
    Subject: [silktest] string convertion


    Hi all,


    I need a little help to convert this string that i capture form the about
    window and convert it to something that i can name a directory after
    preferably the second string if possible. Your help is appreciated.

    STRING sCapture = "Version: 1.13 (build 15)"

    STRING sDirName = "version_1_13_15"

    TIA


    Yahoo! Groups Sponsor
    Post message: silktest@yahoogroups.com
    Subscribe: silktest-subscribe@yahoogroups.com
    Unsubscribe: silktest-unsubscribe@yahoogroups.com
    List owner: silktest-owner@yahoogroups.com
    URL to this page: http://groups.yahoo.com/group/silktest


    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

    ----------------------------------------------------------------------------
    --
    Get your FREE download of MSN Explorer at http://explorer.msn.com

    [Non-text portions of this message have been removed]



  4. #4
    Junior Member
    Join Date
    Apr 2000
    Location
    Cupertino,CA,95014
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: string convertion

    User Edward Dias (dsd_hca@hotmail.com) posted:

    Thanks All for the help, this code sample works great.
    __________________________________________________ _______________
    Get your FREE download of MSN Explorer at http://explorer.msn.com



 

 

Posting Permissions

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

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 10:58 AM.

Copyright BetaSoft Inc.