diff --git a/strings.qmd b/strings.qmd index 9bafb4c..62a6587 100644 --- a/strings.qmd +++ b/strings.qmd @@ -117,7 +117,7 @@ str_view(tricky) ``` A raw string usually starts with `r"(` and finishes with `)"`. -But if your string contains `)"` you can instead use `r"[]"` or `r"{}"`, and if that's still not enough, you can insert any number of dashes to make the opening and closing pairs unique, e.g., `` `r"--()--" ``, `` `r"---()---" ``, etc. Raw strings are flexible enough to handle any text. +But if your string contains `)"` you can instead use `r"[]"` or `r"{}"`, and if that's still not enough, you can insert any number of dashes to make the opening and closing pairs unique, e.g., `r"--()--"`, `r"---()---"`, etc. Raw strings are flexible enough to handle any text. ### Other special characters @@ -197,7 +197,7 @@ If you are mixing many fixed and variable strings with `str_c()`, you'll notice df |> mutate(greeting = str_glue("Hi {name}!")) ``` -As you can see, `str_glue()` currently converts missing values to the string `"NA"` unfortunately making it inconsistent with `str_c()`. +As you can see, `str_glue()` currently converts missing values to the string `"NA"`, unfortunately making it inconsistent with `str_c()`. You also might wonder what happens if you need to include a regular `{` or `}` in your string. You're on the right track if you guess you'll need to escape it somehow.