

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# endsWith
<a name="endsWith-function"></a>

`endsWith`은(는) 표현식이 지정한 하위 문자열로 끝나는지 평가합니다. 표현식이 하위 문자열로 끝나는 경우 true를 반환하고 그렇지 않으면 `endsWith`에서 false를 반환합니다.

## 구문
<a name="endsWith-function-syntax"></a>

```
endsWith(expression, substring, string-comparison-mode)
```

## 인수
<a name="endsWith-function-arguments"></a>

 *expression*   
표현식은 문자열이어야 합니다. 문자열 데이터 형식을 사용하는 필드의 이름, **'12 Main Street'**와 같은 리터럴 값 또는 문자열을 출력하는 다른 함수에 대한 호출일 수 있습니다.

 *substring*   
표현식과 비교하여 확인할 문자 세트입니다. 이 하위 문자열은 표현식에서 2회 이상 나타날 수 있습니다.

 string-comparison-mode   
(선택 사항) 사용할 문자열 비교 모드를 지정합니다.  
+ `CASE_SENSITIVE` - 문자열 비교는 대/소문자를 구분합니다.
+ `CASE_INSENSITIVE` - 문자열 비교는 대/소문자를 구분하지 않습니다.
비어 있을 때 이 값은 기본적으로 `CASE_SENSITIVE`로 설정됩니다.

## 반환 타입
<a name="endsWith-function-return-type"></a>

부울

## 예제
<a name="endsWith-function-example"></a>

### 대/소문자를 구분하는 예
<a name="endsWith-function-example-default-case-sensitive"></a>

다음 대소문자를 구분하는 예에서는 `state_nm`이 **"York"**로 종료되는지 평가합니다.

```
endsWith(state_nm, "York")
```

다음은 주어진 필드 값의 예입니다.

```
New York
new york
```

이러한 필드 값의 경우 다음 값이 반환됩니다.

```
true
false
```

### 대소문자를 구분하지 않는 예
<a name="endsWith-function-example-case-insensitive"></a>

다음 대소문자를 구분하지 않는 예에서는 `state_nm`이 **"york"**로 종료되는지 평가합니다.

```
endsWith(state_nm, "york", CASE_INSENSITIVE)
```

다음은 주어진 필드 값의 예입니다.

```
New York
new york
```

이러한 필드 값의 경우 다음 값이 반환됩니다.

```
true
true
```

### 조건문을 사용한 예
<a name="endsWith-function-example-conditional-statements"></a>

`endsWith` 함수는 [avgIf](https://docs.aws.amazon.com/quicksight/latest/user/avgIf-function.html), [minIf](https://docs.aws.amazon.com/quicksight/latest/user/minIf-function.html), [distinct\$1countIf](https://docs.aws.amazon.com/quicksight/latest/user/distinct_countIf-function.html), [countIf](https://docs.aws.amazon.com/quicksight/latest/user/countIf-function.html), [maxIf](https://docs.aws.amazon.com/quicksight/latest/user/maxIf-function.html), [medianIf](https://docs.aws.amazon.com/quicksight/latest/user/medianIf-function.html), [stdevIf](https://docs.aws.amazon.com/quicksight/latest/user/stdevIf-function.html), [stdevpIf](https://docs.aws.amazon.com/quicksight/latest/user/stdevpIf-function.html), [sumIf](https://docs.aws.amazon.com/quicksight/latest/user/sumIf-function.html), [varIf](https://docs.aws.amazon.com/quicksight/latest/user/varIf-function.html), 그리고 [varpIf](https://docs.aws.amazon.com/quicksight/latest/user/varpIf-function.html) 함수 내에서 조건문으로 사용할 수 있습니다.

다음 예제에서는 `state_nm`이(가) **"York"**(으)로 종료되는 경우에만 `Sales` 합계를 계산합니다.

```
sumIf(Sales,endsWith(state_nm, "York"))
```

### 예제는 포함되어 있지 않습니다.
<a name="endsWith-function-example-does-not-start-with"></a>

조건부 `NOT` 연산자는 표현식이 지정된 하위 문자열로 시작하지 않는지 평가하는 데 사용할 수 있습니다.

```
NOT(endsWith(state_nm, "York"))
```

### 숫자 값을 사용한 예
<a name="endsWith-function-example-numeric-values"></a>

`toString`함수를 적용하여 표현식 또는 하위 문자열 인수에 숫자 값을 사용할 수 있습니다.

```
endsWith(state_nm, toString(5) )
```