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

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -