forked from KOBA789/node.js_ja
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathstring_decoder.json
More file actions
50 lines (50 loc) · 2.37 KB
/
Copy pathstring_decoder.json
File metadata and controls
50 lines (50 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{
"source": "doc/api/string_decoder.markdown",
"modules": [
{
"textRaw": "StringDecoder",
"name": "stringdecoder",
"stability": 3,
"stabilityText": "Stable",
"desc": "<!--\nTo use this module, do `require('string_decoder')`. StringDecoder decodes a\nbuffer to a string. It is a simple interface to `buffer.toString()` but provides\nadditional support for utf8.\n-->\n\n<p>このモジュールを使用するには <code>require('string_decoder')</code> をします。\nStringDecoder はバッファから文字列にデコードします。\nこれは単純なインターフェース <code>buffer.toString()</code> ですが、\nUTF-8 を特別にサポートします。\n\n</p>\n<pre><code>var StringDecoder = require('string_decoder').StringDecoder;\nvar decoder = new StringDecoder('utf8');\n\nvar cent = new Buffer([0xC2, 0xA2]);\nconsole.log(decoder.write(cent));\n\nvar euro = new Buffer([0xE2, 0x82, 0xAC]);\nconsole.log(decoder.write(euro));</code></pre>\n",
"classes": [
{
"textRaw": "Class: StringDecoder",
"type": "class",
"name": "StringDecoder",
"desc": "<!--\nAccepts a single argument, `encoding` which defaults to `utf8`.\n-->\n\n<p>文字列の引数 <code>encoding</code> を受け取ります。デフォルトは <code>'utf8'</code> です。\n\n</p>\n",
"methods": [
{
"textRaw": "decoder.write(buffer)",
"type": "method",
"name": "write",
"desc": "<!--\nReturns a decoded string.\n-->\n\n<p>デコードされた文字列を返します。\n\n</p>\n",
"signatures": [
{
"params": [
{
"name": "buffer"
}
]
}
]
},
{
"textRaw": "decoder.end()",
"type": "method",
"name": "end",
"desc": "<!--\nReturns any trailing bytes that were left in the buffer.\n-->\n\n<p>バッファに残った終端のバイト列を返します。\n</p>\n",
"signatures": [
{
"params": []
}
]
}
]
}
],
"type": "module",
"displayName": "StringDecoder"
}
]
}