提交 b82e2d12 编写于 作者: S sunyaozu

fix code sample instance

Signed-off-by: Nsunyaozu <sunyaozu@huawei.com>
上级 a2d33c44
...@@ -1194,7 +1194,7 @@ getInstance(locale?:string): IndexUtil ...@@ -1194,7 +1194,7 @@ getInstance(locale?:string): IndexUtil
**示例:** **示例:**
```js ```js
let indexUtil= I18n.getInstance("zh-CN"); let indexUtil = I18n.getInstance("zh-CN");
``` ```
...@@ -1267,7 +1267,7 @@ getIndex(text: string): string ...@@ -1267,7 +1267,7 @@ getIndex(text: string): string
**示例:** **示例:**
```js ```js
let indexUtil= I18n.getInstance("zh-CN"); let indexUtil = I18n.getInstance("zh-CN");
let index = indexUtil.getIndex("hi"); // index = "H" let index = indexUtil.getIndex("hi"); // index = "H"
``` ```
...@@ -1382,7 +1382,7 @@ first(): number ...@@ -1382,7 +1382,7 @@ first(): number
**示例:** **示例:**
```js ```js
let iterator = i18n.getLineInstance("en"); let iterator = I18n.getLineInstance("en");
iterator.setLineBreakText("Apple is my favorite fruit."); iterator.setLineBreakText("Apple is my favorite fruit.");
let firstPos = iterator.first(); // firstPos = 0 let firstPos = iterator.first(); // firstPos = 0
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册