お知らせ:
2025 年 4 月 15 日より前に Earth Engine の使用を登録したすべての非商用プロジェクトは、アクセスを維持するために
非商用目的での利用資格を確認する必要があります。2025 年 9 月 26 日までに確認が完了していない場合、アクセスが保留されることがあります。
ee.String.length
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
文字列の長さを返します。
| 用途 | 戻り値 |
|---|
String.length() | Integer |
| 引数 | タイプ | 詳細 |
|---|
これ: string | 文字列 | 長さを取得する文字列。 |
例
コードエディタ(JavaScript)
print(ee.String('').length()); // 0
print(ee.String('abc123').length()); // 6
Python の設定
Python API とインタラクティブな開発での geemap の使用については、
Python 環境のページをご覧ください。
import ee
import geemap.core as geemap
Colab(Python)
print(ee.String('').length().getInfo()) # 0
print(ee.String('abc123').length().getInfo()) # 6
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[],["The `String.length()` method calculates the number of characters in a string. It takes a string as input (`this: string`) and returns an integer representing the string's length. For example, an empty string returns a length of 0, while the string 'abc123' returns a length of 6. This function can be used in both JavaScript and Python (using the `ee` library and `geemap`).\n"]]