iPhone Java String Code to Object C -
I have 2 string operations I will need relevant in Object C
/ / Newstring counter from Mystring starts with java: newstring = mystring.substring (counter) obje-c:? Get the position from the search string in
// Messaging Java: startpos = mystring.indexOf (SearchString) Obj-C:?
It would be nice that you have
Tux Chris
Edit: I have two other questions and now the solution (here is the ALS for others)
nsstaining 's substringFromIndex And rangeOfString methods are equivalent to the Java methods you specify:
will be newstring = mystring.substring (counter) :
NSString * newString = [mystring substringFromIndex: counter]; and
startpos = mystring.indexOf (searchstring) will be:
NSInteger startPos = [mystring rangeOfString: SearchString]. place; and
newstring = mystring.substring (counter, from start)
NSString * newstring = [mystring substringWithRange: NSMakeRange (counter, startupframe)];
Comments
Post a Comment