memory block -> C++ strings

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • barcaroller

    memory block -> C++ strings


    I have a large block of memory. I need to (1) check if it contains only
    ASCII characters (including newlines and/or carriage-returns) and, if so,
    (2) extract the lines into individual C++ strings.

    Currently I loop the entire block (byte for byte), run isascii(byte) on each
    byte, and then call getline() (either string.getline or iostream.getlin e
    does the job). This is proving too slow. I'm sure this problem has been
    solved using more efficient methods. Any suggestions?



Working...