How to combine two strings in Objective-C for an iPhone app

后端 未结 7 1621
名媛妹妹
名媛妹妹 2020-12-31 10:21

How can I combine \"stringURL\" and \"stringSearch\" together?

- (IBAction)search:(id)sender;{
stringURL = @\"http://www.websitehere.com/index.php?s=\";
stri         


        
7条回答
  •  梦毁少年i
    2020-12-31 10:48

    You can use stringByAppendingString:

     stringURL = [@"http://www.websitehere.com/index.php?s=" 
                          stringByAppendingString:search.text];
    

提交回复
热议问题