How to create a string with format?

后端 未结 12 1339
别跟我提以往
别跟我提以往 2020-11-30 18:13

I need to create a string with format which can convert int, long, double etc. types into string. Using Obj-C, I can do it via below way.

NSString *str = [NS         


        
12条回答
  •  天涯浪人
    2020-11-30 18:55

    nothing special

    let str = NSString(format:"%d , %f, %ld, %@", INT_VALUE, FLOAT_VALUE, LONG_VALUE, STRING_VALUE)
    

提交回复
热议问题