ee.String.cat

  • String.cat() combines two strings together, resulting in a new, single string.

  • The first string is represented by this: string1 while the second string is denoted as string2 within the function.

  • Usage involves calling .cat() on the initial string and providing the second string as an argument, as shown in the examples for JavaScript, Python using geemap and Colab with getInfo().

Concatenates two strings.

UsageReturns
String.cat(string2)String
ArgumentTypeDetails
this: string1StringThe first string.
string2StringThe second string.

Examples

Code Editor (JavaScript)

print(ee.String('cat').cat(' bird'));  // 'cat bird'

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)

print(ee.String('cat').cat(' bird').getInfo())  # 'cat bird'