VBA

CLEAN method for Google Apps Script

Gists This is a sample script which works the same action with the CLEAN method of VBA. The CLEAN method of VBA removes the characters of 0-31, 127, 129, 141, 143, 144, 157. Although I had looked for such method for Google Apps Script, I couldn’t find it. So I created this. If this is useful for you, I’m glad. function cleanForGAS(str) { if (typeof str == "string") { var escaped = escape(str.