gpt4 book ai didi

iphone - ios:如何将 NSString 转换为 int64_t?

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:04:17 24 4
gpt4 key购买 nike

我想将 NSString 转换为 int64_t,然后使用以下命令将其打印出来:

NSLog("%lld", i);

现在我只能使用 [str integerValue] 进行转换,这有时会使它打印出负数。

最佳答案

您可以使用[str longLongValue]

例如:

int64_t i=[@"23570449442514" longLongValue];

关于iphone - ios:如何将 NSString 转换为 int64_t?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11192105/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com