ee.String.toUpperCase

  • The toUpperCase() function converts all characters within a specified string to uppercase.

  • It takes a single argument: the input string (this: string).

  • The function returns a new string with all characters in uppercase, leaving the original string unchanged.

  • Examples are provided for JavaScript, Python setup, and Colab (Python).

Converts all of the characters in a string to upper case.

UsageReturns
String.toUpperCase()String
ArgumentTypeDetails
this: stringStringThe string to convert to upper case.

Examples

Code Editor (JavaScript)

var s = ee.String('AaBbCc123');
print(s.toUpperCase());  // AABBCC123

Python setup

See the Python Environment page for information on the Python API and using geemap for interactive development.

import ee
import geemap.core as geemap

Colab (Python)

s = ee.String('AaBbCc123')
print(s.toUpperCase().getInfo())  # AABBCC123