File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Preprocessor/Preprocessor Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ func processFile(path: String, outputPath: String) -> String {
47
47
let suffix = codePlusSuffixSeparated [ 1 ]
48
48
49
49
if code. hasPrefix ( " = " ) {
50
- functionContentComponents. append ( " components.append(String( \( code . substring ( from : code. index ( after: code. startIndex) ) ) )) \n " )
50
+ functionContentComponents. append ( " components.append(String( \( String ( code [ code . index ( after: code. startIndex) ..< code . endIndex ] ) ) )) \n " )
51
51
}
52
52
else {
53
53
functionContentComponents. append ( " \( code) \n " )
@@ -90,7 +90,7 @@ for file in files {
90
90
91
91
let path = ( sourceFilesRoot as NSString ) . appendingPathComponent ( file as String )
92
92
let endIndex = path. index ( before: path. index ( before: path. index ( before: path. endIndex) ) )
93
- let outputPath = path. substring ( to : endIndex) + " .swift "
93
+ let outputPath = String ( path [ path . startIndex ..< endIndex] ) + " .swift "
94
94
95
95
generateAllFiles. append ( " _ = { () -> Void in \n \( processFile ( path: path, outputPath: outputPath) ) \n }() \n " )
96
96
}
You can’t perform that action at this time.
0 commit comments