Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

pad_center

String.pad_center

pad this string at the beginning and at the end with `p` such that its `codepoint_count` is at least `n`.

In case the required number of copies of `p` is odd, the padding at the end will be longer.
Precondition
pre
  safety: p.codepoint_count > 0
  debug: n >= 0
Postcondition
post
  debug: result.codepoint_count >= n
  debug: ((result.codepoint_count >= n+p.codepoint_count): result = String.this)
0.095dev (GIT hash fe578dbae82d257bfb6d755e3b05abbf37247dbe)
last changed: 2026-05-12