सूचना: जिन गैर-व्यावसायिक प्रोजेक्ट के लिए Earth Engine को
15 अप्रैल, 2025 से पहले रजिस्टर किया गया है उन्हें ऐक्सेस बनाए रखने के लिए,
गैर-व्यावसायिक इस्तेमाल से जुड़ी ज़रूरी शर्तों की पुष्टि करनी होगी. अगर आपने 26 सितंबर, 2025 तक पुष्टि नहीं की, तो आपके ऐक्सेस को होल्ड पर रखा जा सकता है.
ee.String.rindex
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
यह फ़ंक्शन, किसी स्ट्रिंग में सबस्ट्रिंग की आखिरी मौजूदगी को खोजता है. यह फ़ंक्शन, पहले मैच का इंडेक्स या -1 दिखाता है.
| इस्तेमाल | रिटर्न |
|---|
String.rindex(pattern) | पूर्णांक |
| आर्ग्यूमेंट | टाइप | विवरण |
|---|
यह: target | स्ट्रिंग | खोजे जाने वाला स्ट्रिंग. |
pattern | स्ट्रिंग | ढूंढने के लिए स्ट्रिंग. |
उदाहरण
कोड एडिटर (JavaScript)
print(ee.String('aBc-Abc').rindex('A')); // 4
print(ee.String('aBc-Abc').rindex('a')); // 0
print(ee.String('aBc-Abc').rindex('Bc')); // 1
print(ee.String('aBc-Abc').rindex('Z')); // -1
print(ee.String('aBc-Abc').rindex('-')); // 3
print(ee.String('aBc-Abc').rindex('')); // 7
Python सेटअप करना
Python API और इंटरैक्टिव डेवलपमेंट के लिए geemap का इस्तेमाल करने के बारे में जानकारी पाने के लिए,
Python एनवायरमेंट पेज देखें.
import ee
import geemap.core as geemap
Colab (Python)
display(ee.String('aBc-Abc').rindex('A')) # 4
display(ee.String('aBc-Abc').rindex('a')) # 0
display(ee.String('aBc-Abc').rindex('Bc')) # 1
display(ee.String('aBc-Abc').rindex('Z')) # -1
display(ee.String('aBc-Abc').rindex('-')) # 3
display(ee.String('aBc-Abc').rindex('')) # 7
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-10-30 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-10-30 (UTC) को अपडेट किया गया."],[],["The `rindex` function searches a target string for the last occurrence of a specified substring (`pattern`). It returns an integer representing the index of the first character of the last match, or -1 if the substring is not found. If the pattern is an empty string, it returns the length of the string. The function is used as `String.rindex(pattern)`. Examples show it working on various substrings with JavaScript and Python.\n"]]