Skip to content

Instantly share code, notes, and snippets.

@mas3
Created March 28, 2013 13:30
Show Gist options
  • Save mas3/5263130 to your computer and use it in GitHub Desktop.
Save mas3/5263130 to your computer and use it in GitHub Desktop.
行末清掃(「スクリプト実行」用スクリプト)
/*
* 行末清掃
* (行末の余計な空白やタブを削除する)
*
* 「スクリプト実行」用スクリプト
* http://books.ivory.ne.jp/execscript/
*/
var lines = data.split("\n");
var outdata = new Array();
for (var i = 0; i < lines.length; i++) {
var line = lines[i];
line = line.replace(/\s+$/, '');
outdata.push(line);
}
return outdata.join("\n");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment