Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion string replace function
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Norris Boyd  
View profile  
 More options Jan 12, 11:12 am
Newsgroups: mozilla.dev.tech.js-engine.rhino
From: Norris Boyd <norrisb...@gmail.com>
Date: Mon, 12 Jan 2009 08:12:31 -0800 (PST)
Local: Mon, Jan 12 2009 11:12 am
Subject: Re: string replace function
On Jan 12, 7:17 am, chris idr <ch...@idrsolutions.com> wrote:

> Hi all,

> can anyone tell me if rhino properly supports the replace function in
> javascript, as i have an example and it doesn't seem to.

> all it seems to do is redirect the call to java replace.

> i have a replace(/,/gi,";");  (the g means replace all and the i means
> ignore case)

> can anyone tell me how to make this work properly, or when it might be
> added.

> if its not going to be added anytime soon, then could someone be kind
> enough to tell me what to change in rhino itself so i can get it to
> work, and i will submit my fix to you for inspection

> regards
> chris wade

The replace function is completely implemented as far as I know:

js> var s = "Hi, Mom";
js> s.replace(/m/gi, 'b');
Hi, bob

What isn't working for you?

--Norris


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google