Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2017年4月.
padEnd() は String 値のメソッドで、結果の文字列が指定した長さになるように、現在の文字列を他の文字列で(必要に応じて繰り返して)延長します。延長は、現在の文字列の末尾から適用されます。
現在の str がパディングされた後の、結果の文字列の長さ。値が str.length 以下の場合、str はそのまま返されます。
padString 省略可現在の str を埋める文字列。padString が targetLength を超える場合、その部分は終わりから切り捨てられます。既定値は空白文字 (U+0020) です。
文字列で、 targetLength で指定された長さにするために、 padString を末尾に適用したものです。
| ECMAScript® 2027 Language Specification # sec-string.prototype.padend |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025年8月22日 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.