IOS基礎入門OC語言Xcode Day13筆記:字符串的轉換與拼接

一、字符串與int、float互轉web NSString *str1 = @"123"; // 1.字符串轉int int num1 = [str intValue]; // 2.int裝字符串 NSString *str2 = [NSString stringWithFormat:@"%d",num1]; // 3.字符串轉float float num2 = [string floatVa
相關文章
相關標籤/搜索