File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
sources/net.sf.j2s.java.core/src/java/lang Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,9 @@ String.prototype.replaceFirst = function (exp, str) {
8080 return this . replace ( regExp , this . $generateExpFunction ( str ) ) ;
8181} ;
8282String . prototype . matches = function ( exp ) {
83+ if ( exp != null ) {
84+ exp = "^(" + exp + ")$" ;
85+ }
8386 var regExp = new RegExp ( exp , "gm" ) ;
8487 var m = this . match ( regExp ) ;
8588 return m != null && m . length != 0 ;
@@ -543,5 +546,12 @@ String.instantialize = function () {
543546 return s ;
544547 }
545548} ;
549+
550+ if ( navigator . userAgent . toLowerCase ( ) . indexOf ( "chrome" ) != - 1 ) { // Google Chrome's bug
551+ String . prototype . toString = function ( ) {
552+ return this ;
553+ } ;
554+ }
555+
546556} // end of String.prototype.$replace
547557} ) ;
You can’t perform that action at this time.
0 commit comments