Skip to content

Commit

Permalink
ee.String.index: Give an example of the method being case sensitive.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 675576091
  • Loading branch information
schwehr authored and copybara-github committed Sep 17, 2024
1 parent f1b8e8d commit b5dfabe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions samples/javascript/apidocs/ee-string-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@
print(ee.String('abc123').index('')); // 0
print(ee.String('abc123').index('c1')); // 2
print(ee.String('abc123').index('ZZ')); // -1

// index is case-sensitive.
print(ee.String('abc123').index('BC')); // -1
// [END earthengine__apidocs__ee_string_index]
3 changes: 3 additions & 0 deletions samples/python/apidocs/ee_string_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@
print(ee.String('abc123').index('').getInfo()) # 0
print(ee.String('abc123').index('c1').getInfo()) # 2
print(ee.String('abc123').index('ZZ').getInfo()) # -1

# index is case-sensitive.
print(ee.String('abc123').index('BC').getInfo()) # -1
# [END earthengine__apidocs__ee_string_index]

0 comments on commit b5dfabe

Please sign in to comment.