Ejemplo n.º 1
0
//--------------------------------------------------------------
// comma format speed
void SpeedUI::commaFormat(
  mgString& line,
  const char* suffix,
  int value)
{
  line.format("%d %s", value, (const char*) suffix);

  // add the commas
  int posn = line.find(0, ' ')-3;
  while (posn > 0)
  {
    line.insertAt(posn, ",", 1);
    posn -= 3;
  }
}