projects
/
org.ibex.core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2004/01/07 20:37:33
[org.ibex.core.git]
/
src
/
org
/
xwt
/
js
/
JSRegexp.java
diff --git
a/src/org/xwt/js/JSRegexp.java
b/src/org/xwt/js/JSRegexp.java
index
3bb5ab9
..
0994a36
100644
(file)
--- a/
src/org/xwt/js/JSRegexp.java
+++ b/
src/org/xwt/js/JSRegexp.java
@@
-153,7
+153,7
@@
public class JSRegexp extends JS {
public static Object stringReplace(Object o, Object arg0, Object arg1) throws JSExn {
String s = o.toString();
RE re;
public static Object stringReplace(Object o, Object arg0, Object arg1) throws JSExn {
String s = o.toString();
RE re;
- JS replaceFunc = null;
+ JSFunction replaceFunc = null;
String replaceString = null;
JSRegexp regexp = null;
if(arg0 instanceof JSRegexp) {
String replaceString = null;
JSRegexp regexp = null;
if(arg0 instanceof JSRegexp) {
@@
-162,10
+162,10
@@
public class JSRegexp extends JS {
} else {
re = newRE(arg0.toString(),0);
}
} else {
re = newRE(arg0.toString(),0);
}
- if(arg1 instanceof JS)
- replaceFunc = (JS) arg1;
+ if(arg1 instanceof JSFunction)
+ replaceFunc = (JSFunction) arg1;
else
else
- replaceString = arg1.toString();
+ replaceString = JS.toString(arg1.toString());
REMatch[] matches;
if(regexp != null && regexp.global) {
matches = re.getAllMatches(s);
REMatch[] matches;
if(regexp != null && regexp.global) {
matches = re.getAllMatches(s);