• String Removal

    From Cyclops@VERT/SRBBS to All on Wed Apr 5 21:42:00 2006
    How would one say... Ok, I KNOW that string1 is in string2, I want to REMOVE string1 from string2, how do I do that?

    I know in older days of programming you had to split a string into 3 different sections and resplice them together.

    Is that still the most efficient method?

    ---
    þ Synchronet þ Shadow River - shadowriver.homeip.net
  • From Digital Man@VERT to Cyclops on Thu Apr 6 00:03:56 2006
    Re: String Removal
    By: Cyclops to All on Wed Apr 05 2006 02:42 pm

    How would one say... Ok, I KNOW that string1 is in string2, I want to REMOV string1 from string2, how do I do that?

    I know in older days of programming you had to split a string into 3 differe sections and resplice them together.

    Is that still the most efficient method?

    JavaScript provides the String.replace() method which works well for this.

    digital man

    Snapple "Real Fact" #3:
    Beavers can hold their breathe for 45 minutes under water.
    Norco, CA WX: 56.1øF, 61% humidity, 6 mph WSW wind, 1.12 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Tracker1@VERT/TRN to Cyclops on Thu Apr 13 08:44:00 2006
    Cyclops wrote:
    How would one say... Ok, I KNOW that string1 is in string2, I want to REMOVE string1 from string2, how do I do that?

    I know in older days of programming you had to split a string into 3 different
    sections and resplice them together.

    Is that still the most efficient method?

    string1 = string1.replace(string2, "")

    --
    Michael J. Ryan - tracker1(at)theroughnecks(dot)net - www.theroughnecks.net icq: 4935386 - AIM/AOL: azTracker1 - Y!: azTracker1 - MSN/Win: (email)

    ---
    þ Synchronet þ theroughnecks.net - you know you want it
  • From Cyclops@VERT/SRBBS to Tracker1 on Sat Apr 15 09:51:00 2006

    I tried the replace method, did not work, no clue why.

    SRBBS and SRC - http://shadowriver.homeip.net:9003 and http://shadowriver.homeip.net:9004


    ---
    þ Synchronet þ Shadow River - shadowriver.homeip.net
  • From Digital Man@VERT to Cyclops on Sat Apr 15 20:13:28 2006
    Re: Re: String Removal
    By: Cyclops to Tracker1 on Sat Apr 15 2006 02:51 am

    I tried the replace method, did not work, no clue why.

    Post some samples of what you tried.

    digital man

    Snapple "Real Fact" #7:
    A queen bee can lay 800-1500 eggs per day.
    Norco, CA WX: 80.4øF, 44% humidity, 0 mph E wind, 0.14 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net