Jack Trowbridge

Age: 17

2d
comment Parsing char array
The code works great, can I ask why do you allocate memory using malloc rather then just set char* output = strncpy(output, start, end-start+1);? I'm a java developer and new to these C concepts
2d
comment Parsing char array
It works! I was reading the code wrong, thank you I've been looking for something like this all night!
2d
accepted Parsing char array
2d
comment Parsing char array
I've updated my input to : const char* input = "+IPD,308:{data:\"abc\"} UNLINK \0"; However I still get the same result
2d
comment Parsing char array
It works! however I get the following result, {data:"abc"}*****************************
2d
comment Parsing char array
I get the following complier error : error: invalid conversion from 'void*' to 'char*' [-fpermissive] which points to the line char* output = malloc(endd-start+2);
2d
comment Extracting JSON text from char response buffer
I'm quite new to C, how do you increment the pointer?
2d
asked Parsing char array
2d
comment Extracting JSON text from char response buffer
Yes those return a pointer but I'm trying to get the contents of the string inside the {} marks. I'm trying to get the contents of the characters inside the two pointers. Is there a function we can use to do that?
2d
comment Extracting JSON text from char response buffer
Thanks!, how would you then extract the string using the pointers these functions return?
2d
asked Extracting JSON text from char response buffer
Jan
31
comment Clearing an array of 'empty' elements
Yes!! That's exactly the answer I was looking for, I knew array_filter and knew there was while space but you put that together with trim. Thanks!
Jan
31
asked Clearing an array of 'empty' elements
Jan
28
asked Bluetooth SPP support in OS X Yosemite
Jan
24
accepted .htaccess non-www to www and http to https
Jan
23
comment .htaccess non-www to www and http to https
Thank you, but I've just uploaded it and get an internal server error
Jan
23
asked .htaccess non-www to www and http to https
Jan
16
awarded Popular Question
Jan
12
awarded Notable Question
Jan
4
accepted Saving User Settings Inside a JAR
1 2 3 4 5