Skip to content

Commit

Permalink
fix file content first line blank and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
vvkeep committed Feb 9, 2018
1 parent 2d2d898 commit c5634bd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions JSONConverter/Classes/Main/FileContent/YWFile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class YWFile {
totalStr += content.toString()
}

totalStr.removeFistChar()
return totalStr
}
}
Expand Down
6 changes: 6 additions & 0 deletions JSONConverter/Classes/Vendor/Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ extension String {
self.removeSubrange(range)
}

mutating func removeFistChar() {
let range = Range(self.startIndex..<self.index(startIndex, offsetBy: 1))
self.removeSubrange(range)
}


static func numSpace(count: Int) -> String {
var space = ""
for _ in 0..<count {
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ JSONConverter 是MAC上iOS开发的辅助小工具,可以快速的把json数
![Json转ObhectMapper.png](http://upload-images.jianshu.io/upload_images/2240549-f94dbef231b7dd63.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

**6.Json转Objective-C**
![Json转Objective-C.png](http://upload-images.jianshu.io/upload_images/2240549-68f9b9ba991152db.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![Json转Objective-C.png](http://upload-images.jianshu.io/upload_images/2240549-d01d60d19bd3f4de.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

安装说明
========================
* clone 这个工程,使用Xcode9运行
Expand Down

0 comments on commit c5634bd

Please sign in to comment.