From 2246ef3e6b3259485fa299129e461af9eaee2509 Mon Sep 17 00:00:00 2001 From: Andy Deng Date: Wed, 15 Jun 2016 11:53:23 +0800 Subject: [PATCH] doc/tutorial-zh-cn: Fix a typo in tutorial --- doc/tutorial.zh-cn.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/tutorial.zh-cn.md b/doc/tutorial.zh-cn.md index 7a0e6e5..3d58966 100644 --- a/doc/tutorial.zh-cn.md +++ b/doc/tutorial.zh-cn.md @@ -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); // 上行的缩写