V
vflyer
I there a quick routine that removes trailing newline chars and
carriage return?
vFlyer Labs
http://www.vflyerlabs.com
carriage return?
vFlyer Labs
http://www.vflyerlabs.com
You can write one:
String.prototype.rtrim = function() {
return this.replace(/\n\r/,"");}
scripts.contact said:You can write one:String.prototype.rtrim = function() {
return this.replace(/\n\r/,"");}
String.prototype.rtrim = function() {
return this.replace(/[\n\r]/,"");}
String.prototype.rtrim = function() {
return this.replace(/[\n\r]/,"");}
A fully backwards compatible, Unicode-compliant regexp would be:
/(\r\n|\r|\n|\u0085|\u000C|\u2028|\u2029)/g
String.prototype.rtrim = function() {
return this.replace(/[\n\r]/,"");}
A fully backwards compatible, Unicode-compliant regexp would be:
/(\r\n|\r|\n|\u0085|\u000C|\u2028|\u2029)/g
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.