Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NSString.stringWithFormat后面能用''单引号而非""双引号吗? #859

Open
iOS-Misaki opened this issue Mar 19, 2020 · 0 comments
Open

Comments

@iOS-Misaki
Copy link

这个是OC的写法:
string = [NSString stringWithFormat:@"abc%@",str];

文档的标准写法是:
string = NSString.stringWithFormat("abc%@", str);

我想问的是这种写法会生效么?
string = NSString.stringWithFormat('abc%@', str);

这两者区别就是单引号和双引号的区别,js语法中单用单引号和单用双引号是没有区别的,但是在用JSPatch语法检查的时候,单引号没有通过,这个是为什么?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant