Skip to content

Function to prepend a string #599

@orgadish

Description

@orgadish

Related to #480 but a different use case:

Often I want to prepend a string that I've built with a standard R pipe (|>), but when piped, str_c only works to add after.

long |>
  pipe() |>
  building_text() %>% 
  {str_c("new_text", .)}

becomes

long |>
  pipe() |>
  building_text() |> 
  str_prepend("new_text")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions