From b5dfabeacc8c2aff2198bf3eab71a91eb1754cf9 Mon Sep 17 00:00:00 2001 From: Kurt Schwehr Date: Tue, 17 Sep 2024 08:22:32 -0700 Subject: [PATCH] ee.String.index: Give an example of the method being case sensitive. PiperOrigin-RevId: 675576091 --- samples/javascript/apidocs/ee-string-index.js | 3 +++ samples/python/apidocs/ee_string_index.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/samples/javascript/apidocs/ee-string-index.js b/samples/javascript/apidocs/ee-string-index.js index e80cb644b..212b2adde 100644 --- a/samples/javascript/apidocs/ee-string-index.js +++ b/samples/javascript/apidocs/ee-string-index.js @@ -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] diff --git a/samples/python/apidocs/ee_string_index.py b/samples/python/apidocs/ee_string_index.py index 3a43e93c3..d09431ac3 100644 --- a/samples/python/apidocs/ee_string_index.py +++ b/samples/python/apidocs/ee_string_index.py @@ -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]