Skip to content

Commit

Permalink
Replace strlen with LENGTH
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-russell committed Apr 23, 2017
1 parent 69e395a commit c56e54b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions inst/include/Rcpp/sugar/functions/strings/trimws.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ inline const char* trim_both(const char* str, R_len_t sz, std::string* buff) {
while (isws(*str)) {
++str; --sz;
}

const char* ptr = str + sz - 1;

for (; ptr > str && isws(*ptr); --sz, --ptr);
Expand Down

0 comments on commit c56e54b

Please sign in to comment.