Results 1 to 4 of 4

Thread: Strip a set of characters from a string

  1. #1
    Senior Member zak's Avatar
    Join Date
    Dec 2008
    Posts
    637
    Rep Power
    83

    Strip a set of characters from a string

    http://rosettacode.org/wiki/Strip_a_..._from_a_string
    Uses "console"
    Dim s,str1,rmv As String
     str1 = "She was a soul stripper. She took my heart!"
     rmv ="aei"
     s = Remove$(str1, Any rmv)
     PrintL s
     WaitKey
    

  2. #2
    Here is the Script BASIC version of this.

    str1 = "She was a soul stripper. She took my heart!"
    rmv = "aei"
    FOR i = 1 TO LEN(rmv)
      str1 = REPLACE(str1, MID(rmv, i, 1), "")
    NEXT
    PRINT str1,"\n"
    
    jrs@laptop:~/sb/sb22/test$ scriba strip.sb
    Sh ws  soul strppr. Sh took my hrt!
    jrs@laptop:~/sb/sb22/test$
    
    Last edited by John Spikowski; 13-01-2015 at 18:21.
    ScriptBasic Project Manager
    Project Site
    support@scriptbasic.org

  3. #3
    Junior Member
    Join Date
    Apr 2015
    Posts
    1
    Rep Power
    0
    and since the site are too big, i suggest Eros may create here a new subforum called rosetta code, and the users can post in that forum their possible contributions to different tasks in rosetta code, if the solution approved then it can be posted to rosetta after editing and elaboration.
    the contributions can be accumulated through time only.
    i have noticed that many Basic forums suffer now from low contributions compared to the previous glory days, i wonder if there are some mysterious alien language there hiding below the horizon abducting them from the Basic language.




    NAT

  4. #4
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,153
    Rep Power
    736
    Hi Collin,

    this is not something happening just with BASIC. The world is changing - code projects move to GitHub and similar systems with version support.
    It makes collaboration much easier.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

Similar Threads

  1. TopDown Characters
    By Petr Schreiber in forum Game story and Character Development
    Replies: 51
    Last Post: 19-10-2009, 08:52
  2. International characters in console windows
    By Jophur in forum Console
    Replies: 11
    Last Post: 03-08-2008, 16:04

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

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