我有很多 NSString 看起来像这样:
@"this is the content. The content of this string may vary, as well as the length, and my include any characters, with numbers Y = 295.000000 X = 207.500000"
Y = 295.000000 X = 207.500000 部分始终保持不变,但 X 和 Y 数字可能会发生变化。
我需要以某种方式获取这些数字并执行以下操作:
coordsFinal.x = 295.000000;
coordsFinal.y = 207.500000;
其格式为:
coordsFinal.x = [NSString stringWithFormat: @"%@", trimmed string];
有任何想法吗??