#include "trim.h" char* trim_left(char* text) { return text; } char* trim_right(char* text) { return text; } char* trim_right2(char* text, size_t len) { return text; } char* trim_inside(char* text) { return text; } const char* find_first_non_whitespace(const char *text) { while ( isspace(*text) ) ++text; return text; } char* trim(char* text) { #if TRIM_LINE1 return trim_line(text, true, false, true); #else return trim_left(trim_right(text)); #endif } char* trim2(char* text, size_t len) { #if TRIM_LINE2 return trim_line2(text, len, true, false, true); #else return trim_left(trim_right2(text, len)); #endif } char* trim_all(char* text) { #if TRIM_LINE1 return trim_line(text, true, true, true); #else return trim_inside(trim_left(trim_right(text))); #endif } char* trim_all2(char* text, size_t len) { #if TRIM_LINE2 return trim_line2(text, len, true, true, true); #else return trim_inside(trim_left(trim_right2(text, len))); #endif } #if TRIM_LINE1 char* trim_line(char* text, bool left, bool inside, bool right) { return text; } #endif // TRIM_LINE1 #if TRIM_LINE2 char* trim_line2(char* text, size_t len, bool left, bool inside, bool right) { return text; } #endif // TRIM_LINE2