Merge pull request #660 from andytimes/for-milo

document typo fix and .gitignore update
This commit is contained in:
Milo Yip 2016-06-27 09:35:42 +08:00 committed by GitHub
commit cf7324b466
2 changed files with 2 additions and 1 deletions

1
.gitignore vendored
View File

@ -20,5 +20,6 @@ Testing
/googletest
install_manifest.txt
Doxyfile
Doxyfile.zh-cn
DartConfiguration.tcl
*.nupkg

View File

@ -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); // 上行的缩写