create buffer with size of string