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. is this the right way or is there any other better way???

is this the right way or is there any other better way???

Scheduled Pinned Locked Moved C / C++ / MFC
jsonperformancequestion
2 Posts 2 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.
  • V Offline
    V Offline
    vijay_aroli
    wrote on last edited by
    #1

    hello everyone!!! i am working on some application. i have to deal with strings. the string may contain the ASCII characters or some other values. i need to check if the string contains ascii characters. for that purpose, i am parsing the string, taking each character at once, checking whether it lies in the ascii range and then print the string only if it has ascii characters. i think this is the right procedure. but i am afraid that the performance is hampered when i am dealing with large number of lengthy strings. so, i wanted to know if there is any other better way. thanks in advance...

    vijay.

    G 1 Reply Last reply
    0
    • V vijay_aroli

      hello everyone!!! i am working on some application. i have to deal with strings. the string may contain the ASCII characters or some other values. i need to check if the string contains ascii characters. for that purpose, i am parsing the string, taking each character at once, checking whether it lies in the ascii range and then print the string only if it has ascii characters. i think this is the right procedure. but i am afraid that the performance is hampered when i am dealing with large number of lengthy strings. so, i wanted to know if there is any other better way. thanks in advance...

      vijay.

      G Offline
      G Offline
      Galatei
      wrote on last edited by
      #2

      You can use: isalpha(char *ch). Regards

      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