Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
Tags
- UITableView
- 해몽
- 신도림 테크노마트
- 앱스토어
- setting
- 보라카이
- 공략
- Example
- 샘플
- 포켓몬 GO
- error
- UIView
- IOS
- afterdelay
- push
- loop
- 아이폰7
- 스마트폰
- GCD
- LG유플러스
- simulator
- Xcode
- 페이백
- Check
- Bitcode
- 얻는법
- 포켓볼
- 신도림
- swift3
- swift
Archives
- Today
- Total
목록String (2)
도래울
swift string search rangeOfString
var string = "hello Swift" if string.rangeOfString("Swift") != nil{ println("exists") } // alternative: not case sensitive if string.lowercaseString.rangeOfString("swift") != nil { println("exists") }
개발/iOS
2016. 7. 19. 10:56
Swift string replace
let aString: String = "This is my string" let newString = aString.stringByReplacingOccurrencesOfString(" ", withString: "+", options: NSStringCompareOptions.LiteralSearch, range: nil)And as noted by @cprcrack below, the options and range parameters are optional, so if you don't want to specify string comparison options or a range to do the replacement within, you only need the following.let aStr..
개발/iOS
2016. 7. 12. 11:02