Skip to content

str_wrap() flexibility - use "<br>" #584

@jack-davison

Description

@jack-davison

Hi tidyverse team,

A very minor suggestion - str_wrap() is very useful, but it appears that it enforces "\n" as the wrapping character. Is it possible to expose the choice of the 'wrapping' string to the user?

My specific use case is that I might want to use it in htmlwidgets-type work (e.g., leaflet legends), and I'd quite like to use "
" instead.

Happy to put together a PR if needed and this is considered 'in scope'.

Best,
Jack

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions