fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion
•
Idioms
•
Idiom # 215: Pad string on the left
Idiom # 215: Pad string on the left
See
programming-idioms.org
:
Code
c * ((m - s.codepoint_length).max 0) + s
What are effects?
Running Example
ex215 is s := "融合слияниеذوب" c := "❗" m := 15 s2 := c * (max 0 m-s.codepoint_length) + s say s2
What are effects?
last changed: 2024-07-01
next: Idiom # 216: Pad a string in the center