Fixed, thanks.
Dave, digging his way out of a massive backlog...
On Sep 23, 2011, at 12:18 PM, Axel Rauschmayer wrote:
http://wiki.ecmascript.org/doku.php?id=harmony:string_extras
I’ve found a small bug:
String.prototype.endsWith = function(s) {
var t = String(s);
return
http://wiki.ecmascript.org/doku.php?id=harmony:string_extras
I’ve found a small bug:
String.prototype.endsWith = function(s) {
var t = String(s);
return this.lastIndexOf(t) === this.length - t.length;
};
Interaction:
.endsWith(/)
true
#.endsWith(//)
true
##.endsWith(///)
true
Fix (e.g
://wiki.ecmascript.org/doku.php?id=harmony:string_extras
I’ve found a small bug:
String.prototype.endsWith = function(s) {
var t = String(s);
return this.lastIndexOf(t) === this.length - t.length;
};
Interaction:
.endsWith(/)
true
#.endsWith(//)
true
##.endsWith(///)
true
Fix (e.g
- s.length ) === String(s);
};
?
I mean lastIndexOf must be much slower...
On Fri, Sep 23, 2011 at 9:18 PM, Axel Rauschmayer a...@rauschma.de
wrote:
http://wiki.ecmascript.org/doku.php?id=harmony:string_extras
I’ve found a small bug:
String.prototype.endsWith = function(s
wrote:
http://wiki.ecmascript.org/doku.php?id=harmony:string_extras
I’ve found a small bug:
String.prototype.endsWith = function(s) {
var t = String(s);
return this.lastIndexOf(t) === this.length - t.length;
};
Interaction:
.endsWith(/)
true
#.endsWith(//)
true
5 matches
Mail list logo