Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 deletions
5
Task/String-matching/Objective-C/string-matching.m
Normal file
5
Task/String-matching/Objective-C/string-matching.m
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
[@"abcd" hasPrefix:@"ab"] //returns true
|
||||
[@"abcd" hasSuffix:@"zn"] //returns false
|
||||
int loc = [@"abab" rangeOfString:@"bb"].location //returns -1
|
||||
loc = [@"abab" rangeOfString:@"ab"].location //returns 0
|
||||
loc = [@"abab" rangeOfString:@"ab" options:0 range:NSMakeRange(loc+1, [@"abab" length]-(loc+1))].location //returns 2
|
||||
Loading…
Add table
Add a link
Reference in a new issue