• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1208
  • Last Modified:

How do I convert Blob to Char

How do I  convert Blob to Char in C
0
1030071002
Asked:
1030071002
1 Solution
 
sarabandeCommented:
assuming the blob is already in a buffer (normally unsigned char). if the blob actually contains text you simply can cast the buffer and add terminating zero char.

   char * p;
   ...
   p = (char *)buffer;
   p[length_of_blob_in_bytes] = '\0';

note you need at least one extra byte for buffer to do so.

Sara



0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now