Skip to contents

This function splits a string formatted in snake_case into its component words, using underscores as delimiters. It is useful for parsing identifiers or variable names that follow snake_case naming conventions.

Usage

splitSnake(x)

Arguments

x

A character string in snake_case to be split.

Value

A list of character vectors, each containing the parts of the string split at underscores.

Examples

splitSnake("this_is_snake_case")
#> [[1]]
#> [1] "this"  "is"    "snake" "case" 
#> 
splitSnake("another_example_here")
#> [[1]]
#> [1] "another" "example" "here"   
#>