# endsWith

Source: https://taxilang.org/docs/language/stdlib/endsWith

**Full name:** `taxi.stdlib.endsWith`

## Signature

```taxi
declare extension function endsWith(source: String, valueToSearchFor:String):Boolean
```

## Description

Returns `true` if `source` ends with the specified suffix. The match is case-sensitive.

```taxi
// Check if a filename has a specific extension
find {
   isCsv: Boolean = FileName.endsWith(".csv")
}
```

## Examples

Checks whether a string ends with a given suffix, case-sensitively.

Query:

```taxi
find {
   hasSuffix: Boolean = "hello.csv".endsWith(".csv")
   nope: Boolean = "hello.csv".endsWith(".json")
}
```

Result:

```json
{
  "hasSuffix": true,
  "nope": false
}
```
