Last active
October 12, 2024 23:23
-
-
Save davidglezz/7305007 to your computer and use it in GitHub Desktop.
Remove quotes from command line arguments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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