Skip to content

Commit 96f9b12

Browse files
committed
[충돌해결] Part1 5.3 truncate
1 parent 70a578c commit 96f9b12

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
새로 만든 문자열의 길이는 `maxlength`가 되어야 하므로, 생략 부호 `"…"`가 차지할 길이를 생각하여 함수를 만들어야 합니다.
22

3-
<<<<<<< HEAD
4-
생략 부호는 유니코드에 등록된 독립된 글자임에 유의하여 답안을 작성해야 합니다. 점 세 개가 아님에 유의하시기 바랍니다.
5-
=======
6-
Note that there is actually a single Unicode character for an ellipsis. That's not three dots.
7-
>>>>>>> upstream/master
3+
생략 부호는 유니코드에 등록된 하나의 문자입니다. 점 세 개가 아님에 유의하세요.
84

95
```js run demo
106
function truncate(str, maxlength) {
117
return (str.length > maxlength) ?
128
str.slice(0, maxlength - 1) + '' : str;
139
}
14-
```
10+
```

0 commit comments

Comments
 (0)