标签:
// **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