docs(endsWith): Update endsWith.md (#339)

Fix wrong returns in Examples.

Co-authored-by: Sojin Park <raon0211@toss.im>
This commit is contained in:
小明的自留地 2024-08-04 20:29:20 +08:00 committed by GitHub
parent 6f559c5b4c
commit a4b77c01dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -29,8 +29,8 @@ function endsWith(str: string, target: string, position: number = 0): string;
```typescript
import { endsWith } from 'es-toolkit/string';
endsWith('fooBar', 'foo') // returns true
endsWith('fooBar', 'Bar') // returns false
endsWith('fooBar', 'foo') // returns false
endsWith('fooBar', 'Bar') // returns true
endsWith('fooBar', 'abcdef') // returns false
endsWith('fooBar', 'foo', 3) // returns true
```