Showing 1 of 7 files from the diff.
Other files ignored by Codecov
NAMESPACE has changed.
NEWS.md has changed.
man/str_trim.Rd has changed.
_pkgdown.yml has changed.

@@ -1,7 +1,7 @@
Loading
1 1
#' Trim whitespace from a string
2 2
#'
3 3
#' `str_trim()` removes whitespace from start and end of string; `str_squish()`
4 -
#' also reduces repeated whitespace inside a string.
4 +
#' also reduces repeated whitespace inside a string; `str_crush()` removes all whitespace.
5 5
#'
6 6
#' @param string A character vector.
7 7
#' @param side Side on which to remove whitespace (left, right or both).
@@ -14,6 +14,9 @@
Loading
14 14
#'
15 15
#' str_squish("  String with trailing,  middle, and leading white space\t")
16 16
#' str_squish("\n\nString with excess,  trailing and leading white   space\n\n")
17 +
#'
18 +
#' str_crush("  String with trailing,  middle, and leading white space\t")
19 +
#' str_crush("\n\nString with excess,  trailing and leading white   space\n\n")
17 20
str_trim <- function(string, side = c("both", "left", "right")) {
18 21
  side <- match.arg(side)
19 22
@@ -29,3 +32,9 @@
Loading
29 32
str_squish <- function(string) {
30 33
  stri_trim_both(str_replace_all(string,"\\s+"," "))
31 34
}
35 +
36 +
#' @export
37 +
#' @rdname str_trim
38 +
str_crush <- function(string) {
39 +
  str_replace_all(string, "\\s", "")
40 +
}
Files Coverage
R 88.19%
Project Totals (27 files) 88.19%
1
comment: false
2

3
coverage:
4
  status:
5
    project:
6
      default:
7
        target: auto
8
        threshold: 1%
9
        informational: true
10
    patch:
11
      default:
12
        target: auto
13
        threshold: 1%
14
        informational: true
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading