MCPcopy
hub / github.com/google/earthengine-api / index

Method index

python/ee/ee_string.py:141–150  ·  view source on GitHub ↗

Searches a string for the first occurrence of a substring. Args: pattern: The string to find. Returns: The index of the first match, or -1.

(self, pattern: _arg_types.String)

Source from the content-addressed store, hash-verified

139 return apifunction.ApiFunction.call_(f'{self.name()}.equals', self, target)
140
141 def index(self, pattern: _arg_types.String) -> ee_number.Number:
142 """Searches a string for the first occurrence of a substring.
143
144 Args:
145 pattern: The string to find.
146
147 Returns:
148 The index of the first match, or -1.
149 """
150 return apifunction.ApiFunction.call_(f'{self.name()}.index', self, pattern)
151
152 def length(self) -> ee_number.Number:
153 """Returns the length of a string."""

Callers 2

WrapperFunction · 0.80
test_indexMethod · 0.80

Calls 2

nameMethod · 0.95
call_Method · 0.80

Tested by 1

test_indexMethod · 0.64