Miscellany
public c v1 · immutable/////removes first line of text from a string//bool removeFirstLine(char text[]) { //find first '\n' u32 n, len; len = strlen(text) +1; //include zero (string nullterminated) for(n=0;n<MAX_TEXT_LENGTH;n++) { // loop until newline is found if(text[n] == '\n') break; } if(n == MAX_TEXT_LENGTH -1 ) // no newline return 0; // error memmove(text, text+n, len-n); //remove text up to newline return 1;}