Guest User

Untitled

a guest
Jan 12th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. Using NSRange rangeOfString
  2. NSRange range = [self.display.text rangeOfString:@"."];
  3. if(range.location == NSNotFound){
  4. self.display.text = [self.display.text stringByAppendingString:@"."];
  5.  
  6. `rangeofString` is used to finds and returns the range of the first occurrence of a given string within the receiver.
Add Comment
Please, Sign In to add comment