blob: 3cdabb07c94cfd79893dc898ed722660c500f4a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
'''
Simple tool to replace string lastchar from array access [] to charAt, for the purpose of IE7 support
'''
import os, sys, re
inputFilename = sys.argv[1];
outputFilename = sys.argv[2];
inputFiledata = open(inputFilename).read()
outputFile = open(outputFilename, "w")
outputFile.write(re.sub('type\[type.length - 1\] ===? "\*"', 'type.charAt(type.length - 1) == "*"', inputFiledata))
outputFile.close()
|