Skip to content

Commit 7e83a80

Browse files
committed
Polish news
1 parent 71eed0c commit 7e83a80

File tree

1 file changed

+26
-27
lines changed

1 file changed

+26
-27
lines changed

NEWS.md

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
## Breaking changes
44

55
* stringr functions now consistently implement the tidyverse recycling rules
6-
(#372). Overall this is a fairly minor change as stringi was already very
7-
close to the tidyverse rules. There are only two major changes:
6+
(#372). There are two main changes:
87

9-
* Only vectors of length 1 are recycled: previously,
10-
(e.g.) `str_detect(letters, c("x", "y"))` worked, but it now errors.
8+
* Only vectors of length 1 are recycled. Previously, (e.g.)
9+
`str_detect(letters, c("x", "y"))` worked, but it now errors.
1110

1211
* `str_c()` ignores `NULLs`, rather than treating them as length 0
1312
vectors.
@@ -20,56 +19,56 @@
2019
* `str_detect()`, `str_starts()`, `str_ends()` and `str_subset()` now error
2120
when used with either an empty string (`""`) or a `boundary()`. These
2221
operations didn't really make sense (`str_detect(x, "")` returned `TRUE`
23-
for all non-empty strings) and made it easy to make mistakes when programming
24-
with patterns.
22+
for all non-empty strings) and made it easy to make mistakes when programming.
2523

2624
## New features
2725

2826
* Many tweaks to the documentation to make it more useful and consistent.
2927

30-
* `str_view()` will use ANSI colouring if available (#370). This works in more
31-
places than HTML widgets and requires fewer dependencies. `str_view()` also
32-
no longer requires a pattern so you can use it to display strings with
33-
special characters. It now highlights whitespace characters apart from space
34-
since otherwise they are often confusing. It's also now vectorised over both
35-
`string` and `pattern` (#407). It defaults to displaying all matches, making
36-
`str_view_all()` redundant (and hence deprecated) (#455).
37-
3828
* New `vignette("from-base")` by @sastoudt provides a comprehensive comparison
3929
between base R functions and their stringr equivalents. It's designed to
4030
help you move to stringr if you're already familiar with base R string
4131
functions (#266).
4232

4333
* New `str_escape()` escapes regular expression metacharacters, providing
44-
an alternative to `fixed()` if you want to compose a pattern from external
45-
strings (#408).
34+
an alternative to `fixed()` if you want to compose a pattern from user
35+
supplied strings (#408).
4636

4737
* New `str_equal()` compares two character vectors using unicode rules,
48-
and optionally ignores case (#381).
38+
optionally ignoring case (#381).
4939

5040
* `str_extract()` can now optionally extract a capturing group instead of
5141
the complete match (#420).
5242

53-
* `str_flatten_comma()` is a special case of `str_flatten()` designed for
54-
comman separated flattening and can handle the special case of Oxford
55-
commas with two elements (#444).
43+
* New `str_flatten_comma()` is a special case of `str_flatten()` designed for
44+
comma separated flattening and can correctly apply the Oxford commas
45+
when there are only two elements (#444).
5646

5747
* New `str_split_1()` is tailored for the special case of splitting up a single
5848
string (#409).
5949

60-
* New `str_split_i()` function to extract only a single piece from a string
61-
(#278, @bfgray3).
50+
* New `str_split_i()` extract a single piece from a string (#278, @bfgray3).
6251

63-
* New `str_like()` function which allows the use of SQL wildcards
64-
(#280, @rjpat).
52+
* New `str_like()` allows the use of SQL wildcards (#280, @rjpat).
6553

66-
* New `str_rank()` to complete set of order/rank/sort functions (#353).
54+
* New `str_rank()` to complete the set of order/rank/sort functions (#353).
6755

6856
* New `str_sub_all()` to extract multiple substrings from each string.
6957

7058
* New `str_unique()` is a wrapper around `stri_unique()` and returns unique
7159
string values in a character vector (#249, @seasmith).
7260

61+
* `str_view()` uses ANSI colouring rather than an HTML widget (#370). This
62+
works in more places and requires fewer dependencies. It includes a number
63+
of other small improvements:
64+
65+
* It no longer requires a pattern so you can use it to display strings with
66+
special characters.
67+
* It highlights unusual whitespace characters.
68+
* It's vectorised over both string` and `pattern` (#407).
69+
* It defaults to displaying all matches, making `str_view_all()` redundant
70+
(and hence deprecated) (#455).
71+
7372
* New `str_width()` returns the display width of a string (#380).
7473

7574
* stringr is now licensed as MIT (#351).
@@ -87,8 +86,8 @@
8786
final separator (#377). It gains a `na.rm` argument to remove missing
8887
values (since it's a summary function) (#439).
8988

90-
* `str_pad()` gains `use_width` argument to control whether to use the total code
91-
point width or the number of code points as "width" of a string (#190).
89+
* `str_pad()` gains `use_width` argument to control whether to use the total
90+
code point width or the number of code points as "width" of a string (#190).
9291

9392
* `str_replace()` and `str_replace_all()` can use standard tidyverse formula
9493
shorthand for `replacement` function (#331).

0 commit comments

Comments
 (0)