gpt4 book ai didi

ios - 是否可以在 NSMakeRange 中进行负定位?

转载 作者:可可西里 更新时间:2023-11-01 06:27:25 24 4
gpt4 key购买 nike

是否可以在 NSMakeRange 中进行负定位?

NSString *string = @"abc";
NSString *myString = [string substringWithRange:NSMakeRange(-1, 1)];

最佳答案

没有。

locationlengthunsigned integers :

typedef struct _NSRange {
NSUInteger location;
NSUInteger length;
} NSRange;

此外,NSMakeRange 函数是 defined如下:

NSRange NSMakeRange (
NSUInteger loc,
NSUInteger len
);

关于ios - 是否可以在 NSMakeRange 中进行负定位?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9375904/

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