Guest User

SubString's handling of lines.

a guest
Feb 7th, 2015
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.30 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <substrings/substrings.h>
  3.  
  4. int main(void)
  5. {
  6.     char StringBuf[64];
  7.     const char *String = "I farted\r\nand it smelled\r\nLike cheese\r\n";
  8.     const char *Advancer = String;
  9.    
  10.     while (SubStrings.Line.GetLine(&Advancer, StringBuf, sizeof StringBuf))
  11.     {
  12.         puts(StringBuf);
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment