Programming-Idioms

History of Idiom 214 > diff from v4 to v5

Edit summary for version 5 :
New Python implementation by user [Oldboy]

Version 4

2019-11-03, 13:34:23

Version 5

2019-11-04, 19:04:16

Idiom #214 Pad string on the right

Append extra character c at the end of string s to make sure its length is at least m.
The length is the number of characters, not the number of bytes.

Idiom #214 Pad string on the right

Append extra character c at the end of string s to make sure its length is at least m.
The length is the number of characters, not the number of bytes.

Code
s = s.ljust(m, c)