StringAppendNumber Example bug in string library?

Hi forum,

As a newbee I just tried the StringAppendNumber Example from the string library and was surprised by the output (copied below).

The first three lines of analog reading output are wrong. Is this a known issue and is there some fix available for this?

output:

String Library version: 0.9
Anlog Reading: 28
Anlog Reading: 1682049
Anlog Reading: 167 time since program started:
Anlog Reading: 165 time since program started: 6123
...

unmodified code from StringAppendExample

void loop () {
  dataString = "Anlog Reading: ";  
  // Read the analog input:
  int analogValue = analogRead(0);
  // get the millis():
  long timeStamp = millis();
  // add the reading to the string:
  dataString.append(analogValue);

  // add some more text:
  dataString.append("\t time since program started: ");
  // add the timestamp:
  dataString.append(timeStamp);
  // print the string:
  Serial.println(dataString);

}

Thanks a lot,

Bart

I think I'm missing something... what's wrong with the first three lines?

well, as the print statement is the last one in the loop, I would expect that all statement above it have executed before. As all statements before the print are actually building one big output string, I would expect it to be complete.

So:
Anlog Reading: 165 time since program started: 6123

And not any shorter form and certainly not

Anlog Reading: 1682049

in which the middle part of the append is missing

Bart