Example: itoa

The following example writes the name of a file to the string buffer filename. The name is made up of the word "log", an underscore, and the ascii value of i which in this case is 56.

    int i = 56;
    char filename[64], file_index[32];
    if (!itoa(i, file_index, 10))
        lr_output_message ("Cannot convert i to ascii char"); 
     else {
        sprintf (filename, "log_%s.txt", file_index);
        lr_output_message ("New file name %s", filename);
Action.c(9): New file name log_56.txt