MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / isws

Function isws

inst/include/Rcpp/sugar/functions/strings/trimws.h:36–38  ·  view source on GitHub ↗

NB: std::isspace is not used because it also counts '\f' and '\v' as whitespace, whereas base::trimws only checks for ' ', '\t', '\r', and '\n' */

Source from the content-addressed store, hash-verified

34 '\f' and '\v' as whitespace, whereas base::trimws only
35 checks for ' ', '\t', '\r', and '\n' */
36inline bool isws(const char c) {
37 return c == ' ' || c == '\t' || c == '\n' || c == '\r';
38}
39
40inline const char* trim_left(const char* str) {
41 if (!str) {

Callers 3

trim_leftFunction · 0.85
trim_rightFunction · 0.85
trim_bothFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected