I\'m building a string piece by piece in my program and am currently using a mix of strcat() when I\'m adding a simple string onto the end, but when im adding a formatted string
no it's not possible but you could use sprintf() on those simple strings and avoid calling strlen() every time:
sprintf()
strlen()
len = 0; len += sprintf(buf+len, "%s", str); len += sprintf(buf+len, " number %d", one);