Skip to content

fometaPaloSebaka

Works like fometaPalo, but puts a space in front of a number above 0.

A number below 0 has a "-" sign, which takes up room. A number above 0 has nothing, so written together they do not line up. fometaPaloSebaka puts a space where the sign would be, so that they do.

  • fometaPaloSebaka(123.45) is " 123.45" — note the leading space
  • fometaPaloSebaka(-123.45) is "-123.45"
  • fometaPaloSebaka(123.45, 4) is " 0123.45"

The difference from fometaPaloLetshwao is exactly one thing: for a number above 0, fometaPaloLetshwao inserts "+" while fometaPaloSebaka inserts a space.

Given a list, it returns a list of strings.

fometaPaloSebaka(boleng, kwaPele, kwaMorago)
NameTypeDescription
bolengpaloThe number to format. A list of numbers is also accepted.
kwaPele (optional)paloHow many digits to keep before the point.
kwaMorago (optional)paloHow many digits to keep after the point.
Numbers that line up in the console
tiro setaLoeto() {
  thalaKanefase(400, 400);
  bokamorago(220);
  tlogelaMothalo();

  kwala(fometaPaloSebaka(42));
  kwala(fometaPaloSebaka(-42));
  kwala(fometaPaloSebaka(7, 3));

  tlatsaMmala(150, 90, 200);
  thalaKhutlonne(100, 160, 200, 80);
}

fometaPalo, fometaPaloLetshwao, fometaPaloPhegelwana