扫码关注官方订阅号
业精于勤,荒于嬉;行成于思,毁于随。
appendString 附加的是一个已经完整的字符串。appendFormat 附加的是按指定格式、指定参数的字符串。
比如 [str appendString:@"123"];[str appendFormat:@"name:%@,age:%d", @"张三", 20];
同理,initWithString 和 initWithFormat 也是差不多的。
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
appendString 附加的是一个已经完整的字符串。
appendFormat 附加的是按指定格式、指定参数的字符串。
比如 [str appendString:@"123"];
[str appendFormat:@"name:%@,age:%d", @"张三", 20];
同理,initWithString 和 initWithFormat 也是差不多的。