How can i put a int into a string without ading it and overflow the buffer

I have a 433.92Mhz module and i am making a robot , i need to control it with Processing but i have a problem to transmit a string with a variables in it .

This is the code to transmit:

#include <VirtualWire.h>

const int led_pin = 11;
const int transmit_pin = 12;
const int receive_pin = 2;
const int transmit_en_pin = 3;
int lon;
void setup()
///////// // Initialise the IO and ISR //////////
vw_set_ptt_inverted(true); // Required for DR3100
vw_setup(2000); // Bits per sec
pinMode(led_pin, OUTPUT);

byte count = 1;
String str=“i12X”;//string to send via radio
int nd= 43; //variable to send , for example a PWM value

void loop()

str+=nd;//ad a nd variable to a string

lon=str.length();//sacar longitud del string para hacerlo atuomatico
char chr[lon];//crear array de caracteres con longitud igual a string
str.toCharArray(chr, lon); //convertir string a array de caracteres

chr[lon] = count;//desconocido
digitalWrite(led_pin, HIGH); // Flash a light to show transmitting
vw_send((uint8_t *)chr, lon);//send char aray
vw_wait_tx(); // wait
digitalWrite(led_pin, LOW);
count = count + 1;

Thi is what i get in the other side

i dont want it i need to add a variable just one time without constantly incresing string size also i ned to refresha a string with new value of the variable.
How can i do this ?
Sorry for my bad english.

The String class is problematic and I don't recommend using it. You can achieve what you want easily just by calling snprintf().

char buffer[32]; // make this big enough for your longest string

snprintf(buffer, sizeof(buffer), "i12X%d", nd);
// now buffer contains your message and you can send it via virtual wire

If you insist on continuing to use the String class, you could reset the String variable after each transmission:

str = "";

However, combining the String class with convention c-strings (null terminated char arrays) is not sensible and I suggest you stick with one or the other - my advice is to stop using the String class completely and stick to char arrays.