From c9c8e9e747f8dcc139fc8683eaed5a145a351fb6 Mon Sep 17 00:00:00 2001 From: Yongyi Zeng Date: Mon, 30 Oct 2023 20:16:40 +0800 Subject: [PATCH] Fix some typos in strings.qmd (#1589) --- strings.qmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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.