Get substring
주어진 텍스트에서 하위 텍스트를 추출해 mReturnString에 저장합니다.
매개변수
| Argument | Type | Description |
|---|---|---|
| Original text | 텍스트 | 추출 대상 원본 텍스트 |
| Start index | 선택 | 추출 시작점 지정 — Start of text / Character position |
| Character position | 숫자 | 추출할 첫 문자의 위치 — 0부터 시작하는 인덱스 |
| Length | 선택 | 끝까지 추출할지 일정 길이만 추출할지 — End of text / Number of chars |
| Number of chars | 숫자 | 추출할 문자 수 |
반환값
반환값
성공 시 1, 실패 시 0.
추출된 텍스트는 mReturnString 변수에 저장됩니다.
예제
Character position은 0부터 시작합니다. 아래는 모두 원본 AuroraNoti에서 추출한 예입니다.
| Original text | Start index | Character position | Length | Number of chars | 결과 (mReturnString) |
|---|---|---|---|---|---|
| AuroraNoti | Start of text | - | Number of chars | 6 | Aurora |
| AuroraNoti | Character position | 6 | End of text | - | Noti |
| AuroraNoti | Character position | 0 | Number of chars | 6 | Aurora |
| AuroraNoti | Character position | 6 | Number of chars | 2 | No |
Start index가 Start of text이면 Character position은 무시되고 맨 앞부터, Length가 End of text이면 Number of chars는 무시되고 끝까지 추출합니다.
관련 명령어