Donate Now Goal amount for this month: 100 USD, Received: 0 USD (0%)
Donate to support this site and ThinBASIC project development

Results 1 to 2 of 2

Thread: Strip a set of characters from a string

  1. #1

    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

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

Bookmarks

Posting Permissions

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