strcpy ?

Hello
I need to copy multiple variables into a string.
I can get one variable copied.

strcpy (str, data);// ok data in to str

but I have also:
file
sernr
I must have copied into str

is there anyone who can help me here.

sprintf() or strcat()

strcat() could work.
I fiddling around with it, so I will return.

Arrch:
sprintf() or strcat()

How well does the arduino stuff handle strcat()? Should the OP worry about leakage and crashes?

EDIT: Never mind, I don't know what I was thinking. It's up to the user to supply enough space in s1, duh.

Don't bother with sprintf(). Its kinda' a mess in Arduinoland.

-jim lee

Its kinda' a mess in Arduinoland.

Now your an expert?

jimLee:
Don't bother with sprintf(). Its kinda' a mess in Arduinoland.

I don't know what makes you think that. It works fine, with a known caveat that floating point format specifiers are disabled as standard. It's still a very powerful and flexible way to format values into a string, and not "kinda' a mess".

jimLee:
Don't bother with sprintf(). Its kinda' a mess in Arduinoland.

It's operating within its design parameters, as far as I know. Aren't we all?