Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Formating a string?

Formating a string?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
5 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    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

    P M R J 4 Replies Last reply
    0
    • L Lost User

      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

      P Offline
      P Offline
      Prem Kumar
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • L Lost User

        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

        M Offline
        M Offline
        Martin Speiser
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • L Lost User

          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

          R Offline
          R Offline
          Ramon Casellas
          wrote on last edited by
          #4

          FYI, Even if you don't want to use MFC, the ATL class CUrl (VS .NET Only AFAIK) may come handy Regards, R.

          1 Reply Last reply
          0
          • L Lost User

            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

            J Offline
            J Offline
            JT Anderson
            wrote on last edited by
            #5

            You may also want to take a look at the InternetCrackUrl function.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups