align static method
Implementation
static String align(String text, int length, {isLeft = true}) {
try {
if (isLeft) {
return text.substring(0, length).padRight(length, ' ');
} else {
return text.substring(0, length).padLeft(length, ' ');
}
} catch (_) {
if (isLeft) {
return text.padRight(length, ' ');
} else {
return text.padLeft(length, ' ');
}
}
}