Earth Engine은 공유 컴퓨팅 리소스를 보호하고 모든 사용자에게 안정적인 성능을 보장하기 위해
비상업적 할당량 등급을 도입했습니다. 비상업적 프로젝트는 기본적으로 커뮤니티 등급을 사용하지만 언제든지 프로젝트의 등급을 변경할 수 있습니다.
Google은 AI 기술을 사용하여 콘텐츠를 사용자의 기본 언어로 번역합니다. AI 번역에는 오류가 있을 수 있습니다.
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
[null,null,["최종 업데이트: 2026-11-05(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"]]