StringPad extension

on

Methods

topad(int length, [String? chars]) String
Pads string on the left and right sides if it's shorter than length. Padding characters are truncated if they can't be evenly divided by length. Example: "hello" -> "hello" -> "hello"
toPadEnd(int length, [String? chars]) String
Pads string on the right side if it's shorter than length. Padding characters are truncated if they exceed length. Example: "hello" -> "hello" -> "hello"
toPadStart(int length, [String? chars]) String
Pads string on the left side if it's shorter than length. Padding characters are truncated if they exceed length. Example: "hello" -> "hello" -> "hello"