aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/xpath/functions/string/index.html
blob: a55dcb3362920b197ec8424a7fcf85c9f38328d2 (plain)
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
51
---
title: string
slug: Web/XPath/Functions/string
tags:
  - XSLT
  - XSLT_Reference
translation_of: Web/XPath/Functions/string
---
<p>{{ XsltRef() }}</p>

<p><code>string</code> 関数は与えられた引数を文字列に変換します。</p>

<h3 id="Syntax">構文</h3>

<pre class="eval">string( [<em>object</em>] )
</pre>

<h3 id="Arguments">引数</h3>

<dl>
 <dt><em><code>object</code></em>(省略可)</dt>
 <dd>文字列に変換するオブジェクト。省略すると、コンテキストノードが使用されます。</dd>
</dl>

<h3 id="Returns">返値</h3>

<p>文字列。</p>

<h3 id="Notes"></h3>

<ul>
 <li>オブジェクトがノード集合ならば、その集合内の最初のノードの文字列値が返されます。</li>
 <li>数値は次のように変換されます。
  <ul>
   <li>NaN は文字列 NaN に変換されます。</li>
   <li>正のゼロは文字列 0 に変換されます。</li>
   <li>負のゼロは文字列 0 に変換されます。</li>
   <li>正の無限大は文字列 Infinity に変換されます。</li>
   <li>負の無限大は文字列 -Infinity に変換されます。</li>
   <li>-1 と 1 の間の小数は、小数点の前に 0 を 1 つ付けた形式で文字列に変換されます。</li>
   <li>論理値の true は文字列の true に変換されます。</li>
   <li>論理値の false は文字列の false に変換されます。</li>
  </ul>
 </li>
</ul>

<h3 id="Defined">定義</h3>

<h3 id="Gecko_support">Gecko での対応</h3>

<p>対応済み。</p>