Skip to content

Instantly share code, notes, and snippets.

@davidglezz
Last active December 27, 2015 09:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidglezz/7305007 to your computer and use it in GitHub Desktop.
Save davidglezz/7305007 to your computer and use it in GitHub Desktop.
Remove quotes from command line arguments
void removeQuotes(LPSTR szCommand)
{
int nGet = 0, nSet = 0;
while (szCommand[nGet] != '\0')
{
if (szCommand[nGet] == '\"')
nGet++;
else
{
szCommand[nSet] = szCommand[nGet];
nSet++;
nGet++;
}
}
szCommand[nSet] = '\0';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment