Formating a string?
-
Hi I'm trying to create a simple program that will format a ftp url.. Example: ftp://user:pass@11.11.11.11:21/dir Will be converted to: IP:11.11.11.11 PORT:21 PATH:/dir USERNAME:user PASSWORD:pass How could I do this? What functions might be usefull ?? Thanks
-
Hi I'm trying to create a simple program that will format a ftp url.. Example: ftp://user:pass@11.11.11.11:21/dir Will be converted to: IP:11.11.11.11 PORT:21 PATH:/dir USERNAME:user PASSWORD:pass How could I do this? What functions might be usefull ?? Thanks
Use strtok, or you could just parse it yourself reading character by character, i think most of us would prefer pasring ourselves since it is pretty straight forward.
-
Hi I'm trying to create a simple program that will format a ftp url.. Example: ftp://user:pass@11.11.11.11:21/dir Will be converted to: IP:11.11.11.11 PORT:21 PATH:/dir USERNAME:user PASSWORD:pass How could I do this? What functions might be usefull ?? Thanks
Take a look at the AfxParseURLEx function in the MFC. If you don't want to use MFC, take a look in the source of this function. Martin
-
Hi I'm trying to create a simple program that will format a ftp url.. Example: ftp://user:pass@11.11.11.11:21/dir Will be converted to: IP:11.11.11.11 PORT:21 PATH:/dir USERNAME:user PASSWORD:pass How could I do this? What functions might be usefull ?? Thanks
FYI, Even if you don't want to use MFC, the ATL class CUrl (VS .NET Only AFAIK) may come handy Regards, R.
-
Hi I'm trying to create a simple program that will format a ftp url.. Example: ftp://user:pass@11.11.11.11:21/dir Will be converted to: IP:11.11.11.11 PORT:21 PATH:/dir USERNAME:user PASSWORD:pass How could I do this? What functions might be usefull ?? Thanks
You may also want to take a look at the InternetCrackUrl function.