|
|
|
|
Répondre à Scorpio
|
Editeurs:
[johand@horus]~/src/javascript $cat test.js
String.prototype.trim = function()
{
var a = this.replace(/^\s+/, '');
return a.replace(/\s+$/, '');
};
aString =' abc ';
print ('##' + aString + '##' + aString.trim() + '##' );
[johand@horus]~/src/javascript $rhino test.js #test rhino
## abc ##abc##
[johand@horus]~/src/javascript $smjs test.js #test spidermonkey
## abc ##abc##
[johand@horus]~/src/javascript $uname -a
Linux horus 2.6.16-2-686 #1 Fri Aug 18 19:01:49 UTC 2006 i686 GNU/Linux
Johan Gates gave you the windows. GNU gave us the whole house.(Alexandrin) |
Bonjour
|
Bonjour,
|
Pour la programmation, voir aussi: comment debuter quel langage
|