ee.String.length

傳回字串長度。

用量傳回
String.length()整數
引數類型詳細資料
這個:string字串要取得長度的字串。

範例

程式碼編輯器 (JavaScript)

print(ee.String('').length());  // 0
print(ee.String('abc123').length());  // 6

Python 設定

請參閱 Python 環境頁面,瞭解 Python API 和如何使用 geemap 進行互動式開發。

import ee
import geemap.core as geemap

Colab (Python)

print(ee.String('').length().getInfo())  # 0
print(ee.String('abc123').length().getInfo())  # 6