Skip to content

Instantly share code, notes, and snippets.

Alan Edwardes alanedwardes

Block or report user

Report or block alanedwardes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
alanedwardes / stringurlencode.c
Created Mar 14, 2014
Very simple C method to perform URL encoding on a char buffer. Includes a quick and dity list of characters to exclude. Some compilers will prefer sprintf_s or otherwise.
View stringurlencode.c
// ae - takes URL, puts percents in it.
void encodeUrl(char *out, int outSize, char *in, int inSize)
// Terminate our buffer
out[0] = '\0';
// Loop the input
for (int i = 0; i < inSize; i++)
// Get a char out of it
You can’t perform that action at this time.