Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2017년 4월.
String 값의 padEnd() 메서드는 이 문자열을 주어진 문자열(필요한 경우 반복됨)로 채워서 결과 문자열이 지정된 길이에 도달하도록 합니다. 패딩은 이 문자열의 끝에서부터 적용됩니다.
현재 str이 패딩된 후의 결과 문자열의 길이입니다. 이 값이 str.length보다 작거나 같으면 현재 문자열이 그대로 반환됩니다.
padString Optional현재 str을 채우는 데 사용할 문자열입니다. padString이 targetLength 내에 맞지 않을 정도로 길면 잘립니다. 왼쪽에서 오른쪽으로 쓰는 언어의 경우 가장 왼쪽 부분이, 오른쪽에서 왼쪽으로 쓰는 언어의 경우 가장 오른쪽 부분이 적용됩니다. 이 매개변수의 기본값은 " " (U+0020)입니다.
반환값은 지정된 targetLength를 가진 String으로, 현재 str의 끝에 padString이 적용된 상태입니다.
| ECMAScript® 2027 Language Specification # sec-string.prototype.padend |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025년 2월 11일 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.