doc/tutorial-zh-cn: Fix a typo in tutorial
This commit is contained in:
parent
6f5e83db04
commit
2246ef3e6b
@ -379,7 +379,7 @@ const char * cstr = getenv("USER");
|
||||
size_t cstr_len = ...; // 如果有长度
|
||||
Value s;
|
||||
// s.SetString(cstr); // 这不能通过编译
|
||||
s.SetString(StringRef(cstr)); // 可以,假设它的生命周期案全,并且是以空字符结尾的
|
||||
s.SetString(StringRef(cstr)); // 可以,假设它的生命周期安全,并且是以空字符结尾的
|
||||
s = StringRef(cstr); // 上行的缩写
|
||||
s.SetString(StringRef(cstr, cstr_len));// 更快,可处理空字符
|
||||
s = StringRef(cstr, cstr_len); // 上行的缩写
|
||||
|
Loading…
x
Reference in New Issue
Block a user