首页 > 其他 > 详细

ObjectiveC开发教程--字符串的连接

时间:2017-05-25 20:19:53      阅读:204      评论:0      收藏:0      [点我收藏+]

    NSString *type = @"hello";

    NSString *subtype = @"good";

    NSString *typesub = [NSString stringWithFormat:@"%@>%@",type,subtype];

    NSString *typesub1 = [type stringByAppendingString:subtype];

    NSString *typesub2 = [type stringByAppendingFormat:@"%@>%@",type,subtype];

    NSString *a= @"abc" ;

    NSString *typesub3 = [type stringByAppendingFormat:@"%@>%@>%@" ,type,subtype,a];

    NSLog(@"%@,%@,%@,%@",typesub,typesub1,typesub2,typesub3,typesub3);

ObjectiveC开发教程--字符串的连接

原文:http://www.cnblogs.com/mthoutai/p/6905665.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!