Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void * readFileToList(List * self){
- List * list = List_new();
- StringBuffer *sb = StringBuffer_new();
- const char * input = readFileToBuffer("data.txt", sb, 10000);
- while(input != '\0'){
- if (isdigit(*input))
- {
- StringBuffer_clear(sb);
- while (isdigit(*input))
- {
- StringBuffer_appendChar(sb, *input);
- input++;
- }
- List_add(self, sb);
- input--;
- }
- input++;
- }
- return list;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement