eq#

geetools.ee_string.StringAccessor.eq(other)#

Compare two strings and return a ee.Number.

Parameters:

other (str | ee.String) – The string to compare with.

Returns:

1 if the strings are equal, 0 otherwise.

Return type:

ee.Number

Examples

import ee, geetools
from geetools.utils import initialize_documentation

initialize_documentation()

isEqual = ee.String("foo").geetools.eq("foo")
isEqual.getInfo()
1