Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Code Thread

Name: Anonymous 2018-02-23 0:05

This place has gone from programming themed garbage to just garbage. Post code. Any clean code. Here's a C function to remove whitespace.

void remove_whitespace(char *s) {
char *i = s;
do
if(!isspace(*i = *s))
++i;
while(*s++);
}

Name: Anonymous 2018-02-23 6:54

>>6
It's literally impossible to validate a C string without also passing an integer length (basically reinventing C++ std::string in a shittier more verbose way).

There is no guarantee that it's even possible for the calling code to validate it. E.g., argv[i] doesn't provide a length and many libraries follow that tradition.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List