Created
March 28, 2013 13:30
-
-
Save mas3/5263130 to your computer and use it in GitHub Desktop.
行末清掃(「スクリプト実行」用スクリプト)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 行末清掃 | |
* (行末の余計な空白やタブを削除する) | |
* | |
* 「スクリプト実行」用スクリプト | |
* 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