os0x (owner)

Revisions

gist: 121940 Download_button fork
public
Public Clone URL: git://gist.github.com/121940.git
Embed All Files: show embed
parseIntRight.js #
1
2
3
4
5
6
7
8
9
10
function parseIntRight(str,radix){
    return parseInt(str.split(/\D/).pop(),radix);
}
/*
String.prototype.parseIntRight=function(radix){
return parseInt(this.split(/\D/).pop(),radix);
};
// ["wer12".parseIntRight(),parseIntRight("sas124")]; //-> 12,124
*/