看板 MacDev 關於我們 聯絡資訊
請問各位 在字串前加@是const的意思 但是如果在以下的情型 NSString *str1=@"this is string a"; NSMutableString *mstr; mstr=[NSMutablestring stringwithstring: str1]; [mstr insertString: @" mutable" atIndex:7]; 最後的結果是"this is mutable string a"; 而且實際上mstr這個mutable string其內的字串內容可以改 但為什麼要在 " mutable"前加代表常數的@呢 既然是給mutable string內容,加@就很矛盾了 煩請大家教教我,謝謝!! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.96.39.8
dreambird:@是NSString的意思 05/04 15:23
leondemon:@是objective的意思 05/05 00:23
leondemon:上面我說的是我的看法... 請不要當真 XD 05/05 00:25