SPONSORS:






User Tag List

Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Sep 2002
    Location
    chennai
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    parsing a string character by character

    How do I parse a string character by character? Is there any function for this?

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

  2. #2
    Senior Member
    Join Date
    May 2002
    Posts
    448
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: parsing a string character by character

    nikilesh,

    The GetField function helps to parse but it requires a delimiter. There is no such function to parse character by charater, that I am aware of. However I searched the SilkTest forums for string parsing and got a few hits. Two of them with certain hints towards a custom function. In fact there are some posts with sample functions.
    Check them out. Do get back if they dont serve the purpose.


    ------------------
    never say die
    Life, that dares send, A challenge to his end,
    And when it comes say, Welcome friend.

  3. #3
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: parsing a string character by character

    SubStr()



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

  4. #4
    Senior Member
    Join Date
    May 2002
    Posts
    448
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: parsing a string character by character

    Sorry my mistake, rusty little brain of mine

    Thanks John.

    ------------------
    never say die
    Life, that dares send, A challenge to his end,
    And when it comes say, Welcome friend.

  5. #5
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: parsing a string character by character

    Here is a function to compare two strings: Inside, it walks each string character by character. You can modify it as you see fit.



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

  6. #6
    Member
    Join Date
    Jun 2001
    Location
    Berkeley, CA, USA
    Posts
    67
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: parsing a string character by character

    Each string is also an array. You can see each character in turn by using a for loop and array notation.

    iLen = Len(sString)

    for iLoop = 1 to iLen
    {
    Print(sString[iLoop])
    }

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

  7. #7
    Senior Member
    Join Date
    Dec 2001
    Location
    Bozeman, MT, USA
    Posts
    265
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: parsing a string character by character

    interesting, I never knew that.

    ------------------
    Ryan McCullough
    Accelrys Inc.
    ryan@accelrys.com
    Ryan McCullough
    RightNow Tech. Inc.

 

 

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 11:05 PM.

Copyright BetaSoft Inc.