码迷,mamicode.com
首页 > 其他好文 > 详细

Day4 String Change Too Much ,so delay learning the string

时间:2016-04-03 12:58:12      阅读:184      评论:0      收藏:0      [点我收藏+]

标签:

//                                          **Day4

 

//                                          **String Range

//var str = "hello world  i‘m glad to see your achievement world"

//let number = str.characters.count

//let str2 = "yes my goal is not change"

//str.rangeOfString("world")

//str.rangeOfString("world", options: NSStringCompareOptions.BackwardsSearch)

//str2.rangeOfString("goal", options: NSStringCompareOptions.CaseInsensitiveSearch)

 

// summary   ignore A or a to search use CaseInsensiticeSearch

// summary   search from the end of string use method backwardsSearch

 

// range

//var str : String = "mymymy"

//str.rangeOfString("my")

//str.rangeOfString("my", options: NSStringCompareOptions.BackwardsSearch)

//

//str.startIndex

//str.endIndex

//let strRange = Range<String.Index>(start: str.startIndex , end: str.endIndex)

//

//let startIndex:String.Index = str.startIndex

//let searchIndex = Range<String.Index>(start:str.startIndex,end: str.endIndex)

//str.rangeOfString("my", options: NSStringCompareOptions.CaseInsensitiveSearch, range: searchIndex)

 

 

 

// substring

//var newString = "tang666"

//let startIndex = newString.startIndex

//let endIndex = newString.endIndex

 

Day4 String Change Too Much ,so delay learning the string

标签:

原文地址:http://www.cnblogs.com/tony0571/p/5349530.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!