---
schema_version: "1"
id: d44dd411828bf64188c7e115ab51e971b040f30de3fa6cbe410eb666fef22212
title: charCodeAt
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.3/dw-strings-functions-charcodeat.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.3/dw-strings-functions-charcodeat
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 764d6b3a517a56eca6cbc30fea9525130d95476cd2a315e54508c96d7000e8b4
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
# charCodeAt

## [](#charcodeat1)charCodeAt(String, Number): Number

指定されたインデックスの文字の Unicode を返します。

インデックスが無効の場合、この関数は失敗します。

### [](#パラメーター)パラメーター

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 25%;">
<col style="width: 75%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">名前</th>
<th class="tableblock halign-left valign-top">説明</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">​<code>content</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">入力文字列。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">​<code>position</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">文字列 (文字列配列) 内の文字のインデックス (​<code>Number</code>​ 型)。最初の文字のインデックスは ​<code>0</code>​ であることに注意してください。</p></td>
</tr>
</tbody>
</table>

### [](#例)例

次の例では、「MuleSoft」のインデックス ​`1`​ にある「u」の Unicode を返します。

#### [](#ソース)ソース

```DataWeave
%dw 2.0
import * from dw::core::Strings
output application/json
---
{
  "charCodeAt" : charCodeAt("MuleSoft", 1)
}
```

#### [](#出力)出力

```JSON
{ "charCodeAt": 117 }
```