-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: create
removeLastCharacter
(#293)
- Loading branch information
1 parent
440ab53
commit 2e5967c
Showing
2 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
title: removeLastCharacter | ||
--- | ||
|
||
import { Sandpack } from '@/components/Sandpack'; | ||
|
||
# removeLastCharacter | ||
|
||
Removes the last character from a given Korean string and returns the result. | ||
|
||
For detailed examples, see below. | ||
|
||
```typescript | ||
function removeLastCharacter( | ||
// Korean string | ||
words: string | ||
): string; | ||
``` | ||
|
||
## Examples | ||
|
||
```tsx | ||
removeLastCharacter('안녕하세요 값'); // '안녕하세요 갑' | ||
removeLastCharacter('프론트엔드'); // '프론트엔ㄷ' | ||
removeLastCharacter('일요일'); // '일요이' | ||
removeLastCharacter('전화'); // '전호' | ||
removeLastCharacter('신세계'); // '신세ㄱ' | ||
``` | ||
|
||
## Demo | ||
|
||
<br /> | ||
|
||
<Sandpack> | ||
|
||
```ts index.ts | ||
import { removeLastCharacter } from 'es-hangul'; | ||
|
||
console.log(removeLastCharacter('안녕하세요 값')); // '안녕하세요 갑' | ||
console.log(removeLastCharacter('프론트엔드')); // '프론트엔ㄷ' | ||
``` | ||
|
||
</Sandpack> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
title: removeLastCharacter | ||
--- | ||
|
||
import { Sandpack } from '@/components/Sandpack'; | ||
|
||
# removeLastCharacter | ||
|
||
인자로 주어진 한글 문자열에서 가장 마지막 문자 하나를 제거하여 반환합니다. | ||
|
||
자세한 예시는 아래 Example을 참고하세요. | ||
|
||
```typescript | ||
function removeLastCharacter( | ||
// 한글 문자열 | ||
words: string | ||
): string; | ||
``` | ||
|
||
## Examples | ||
|
||
```tsx | ||
removeLastCharacter('안녕하세요 값'); // '안녕하세요 갑' | ||
removeLastCharacter('프론트엔드'); // '프론트엔ㄷ' | ||
removeLastCharacter('일요일'); // '일요이' | ||
removeLastCharacter('전화'); // '전호' | ||
removeLastCharacter('신세계'); // '신세ㄱ' | ||
``` | ||
|
||
## 사용해보기 | ||
|
||
<br /> | ||
|
||
<Sandpack> | ||
|
||
```ts index.ts | ||
import { removeLastCharacter } from 'es-hangul'; | ||
|
||
console.log(removeLastCharacter('안녕하세요 값')); // '안녕하세요 갑' | ||
console.log(removeLastCharacter('프론트엔드')); // '프론트엔ㄷ' | ||
``` | ||
|
||
</Sandpack> |