开发者

Return array value as NSString

开发者 https://www.devze.com 2022-12-20 03:17 出处:网络
How can you return an array value (witch is a number) as a string? Current code: return [numbers objectAtIndex:row];

How can you return an array value (witch is a number) as a string?

Current code:

return [numbers objectAtIndex:row];

Have also tried:

return @"%@", [numbers objectAtIndex:row];

开发者_如何学PythonWith no luck..

Thanks :) PS: Yes, I am stupid. (:


return [[numbers objectAtIndex:row] description];

In C / ObjC / C++ / Javascript / D / many other C-based languages, the comma operator does not create an array / tuple.

(a,b,c,d,e)

is similar to

e

(while evaluating a and b and c and d as a side-effect).

0

精彩评论

暂无评论...
验证码 换一张
取 消