Sha256: 698fccb2329179b1dcf953c9f883cc78f7a6726917868245f5862d7296ff3df6
Contents?: true
Size: 291 Bytes
Versions: 3
Compression:
Stored size: 291 Bytes
Contents
char * trim(char *str) { char *end; // ltrim while (isspace(*str)) { str++; } if (*str == 0) // only spaces return str; // rtrim end = str + strlen(str) - 1; while (end > str && isspace(*end)) { end--; } // null terminator *(end+1) = 0; return str; }
Version data entries
3 entries across 3 versions & 1 rubygems