简体   繁体   中英

How to concatenate two float values in Objective-C?

我正在开发一个应用程序,但无法连接两个浮点值。

如果您想要一个由两个float的字符串表示形式的字符串,请尝试:

NSString *str = [NSString stringWithFormat:@"%f%f", float1, float2];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM