SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 3 of 3
  1. #1
    SQA Council
    Join Date
    Mar 2001
    Posts
    8,591
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    string replace function?

    User ethoha (ethoha@yahoo.com.nospam) posted:

    Since the data I use is from a spreadsheet, it looks like that I have
    to escape the minuses (and probably many other characters) before I
    can type it. Is there an easy way of doing this, like a string
    replace function? Looking at the string functions in the reference
    guide, it looks like I have to use split(), then loop through the
    array and join it together. Am I overlooking something obvious?

    --- In winrunner@y..., Roman Zilber <romanz@e...> wrote:

  2. #2
    Junior Member
    Join Date
    Apr 2002
    Location
    CA
    Posts
    13
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: string replace function?

    User Komanovsky, Oleg (okomanovsky@evolve.com.nospam) posted:

    ------_=_NextPart_001_01C231DA.EEA09C90
    Content-Type: text/plain

    ############### Replaces every occurance in the string #############
    function ReplaceChr (in sStr, in sFindWhat, in sReplaceWith)
    {
    auto iPos;
    auto sStrTemp;

    if ( match ( sStr, sFindWhat ) == 0 )
    {
    return sStr;
    }

    while ( TRUE )
    {
    if ( match ( sStr, sFindWhat ) != 0 )
    {
    iPos = match (sStr, sFindWhat);

    sStrTemp = sStrTemp & substr ( sStr, 1, iPos - 1 ) &
    sReplaceWith;

    sStr = substr (sStr, iPos + length (sFindWhat) );

    }

    else
    {
    return sStrTemp = sStrTemp & sStr;
    }
    }

    return sStrTemp;
    }


  3. #3
    Senior Member
    Join Date
    Mar 2002
    Location
    Irvine, CA 92606 USA
    Posts
    384
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: string replace function?

    Link to example code: 17368446.zip

    Found this using the "Advanced search", added code to test it...



    ------------------
    cranem451 - cranem@addendum.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
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin 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 12:33 AM.

Copyright BetaSoft Inc.