# 文字の文字コードを調べる(String.charCodeAt) > 指定された位置にある文字の Unicode 値を返します。 - カテゴリ:テキスト(text) - ブロック:""の 0番目の文字の文字コード - URL:https://makecode.minecraft-okinawa.com/reference/text/char-code-at/ - Pythonでの名前:String.char_code_at - 公式データ取得日:2026-11-13 - 動作確認:確認待ち ## JavaScript ```javascript "".charCodeAt(0) ``` ## Python ```python "".char_code_at(0) ``` ## 引数 | 名前 | 値 | 意味 | |---|---|---| | index | 数値 | 目的の文字の位置を 0 から始まる値で指定します。指定した位置に文字がない場合は、NaN が返されます。 | ## 使用例 ### Find the character code for the character at position 6 in a string. ```javascript let sentence = "Super space ship" let myCharCode = sentence.charCodeAt(6) ``` ```python sentence = "Super space ship" myCharCode = sentence.char_code_at(6) ``` ## 出典 - [MakeCode for Minecraft 公式リファレンス(String.charCodeAt)](https://minecraft.makecode.com/reference/text/char-code-at) 執筆:鈴木孝昌(現役プロジェクトマネージャー/マイクラカップ指導者)/運営:沖縄マイクラ部 プログラミングスクール「クロスウェーブ」(https://minecraft-okinawa.com/)