Giter Club home page Giter Club logo

heck's Introduction

heck

R-CMD-check heck status badge Codecov test coverage CRAN status

This repository was developed from the excellent tutorial https://extendr.github.io/user-guide/heckin-case-converter.html. This package is a thin wrapper around the rust crate heck allowing R to convert character vectors to specific cases super fast.

Installation

You can install the development version of heck like so:

r-universe:

install.packages("heck", repos = c("https://dyfanjones.r-universe.dev", "https://cran.r-project.org"))

Github:

remotes::install_github("dyfanjones/heck")

Code of Conduct

Please note that the R heck project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Example

library(heck)


x <- "Demo String"

to_kebab_case(x)
#> [1] "demo-string"

to_lower_camel_case(x)
#> [1] "demoString"

to_upper_camel_case(x)
#> [1] "DemoString"

to_pascal_case(x)
#> [1] "DemoString"

to_snake_case(x)
#> [1] "demo_string"

to_snek_case(x)
#> [1] "demo_string"

to_title_case(x)
#> [1] "Demo String"

to_train_case(x)
#> [1] "Demo-String"

to_shouty_kebab_case(x)
#> [1] "DEMO-STRING"

to_shouty_snake_case(x)
#> [1] "DEMO_STRING"

heck's People

Contributors

dyfanjones avatar

Stargazers

Andrew Allen Bruce avatar  avatar Kenneth Blake Vernon avatar Robin Lovelace avatar Josiah Parry avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.