| 38 | } |
| 39 | |
| 40 | inline const char* trim_left(const char* str) { |
| 41 | if (!str) { |
| 42 | return ""; |
| 43 | } |
| 44 | |
| 45 | while (isws(*str)) { |
| 46 | ++str; |
| 47 | } |
| 48 | |
| 49 | return str; |
| 50 | } |
| 51 | |
| 52 | inline const char* trim_right(const char* str, R_len_t sz, std::string* buff) { |
| 53 | if (!str) { |