toCamelCase: Convert a String to camelCase

View source: R/Stringendo.R

toCamelCaseR Documentation

Convert a String to camelCase

Description

This function takes a string as input and converts it to camelCase format. It splits the string into words using dots as separators, capitalizes the first letter of each word (except the first word), and then concatenates them back together.

Usage

toCamelCase(
  input_string,
  estimated_separator = countDotOrUnderscoreSeparated(input_string),
  toclipboard = TRUE
)

Arguments

input_string

A character string to be converted to camelCase. The function expects a string where words are separated by dots. There is no default value for this parameter; a string must be provided.

estimated_separator

A character string representing the separator used in the input string. Default: countDotOrUnderscoreSeparated(input_string)

toclipboard

Copy to clipboard? Default: TRUE

Value

A character string converted to camelCase.

Examples

toCamelCase("plot.metadata.cor.heatMap")
toCamelCase("plot_metadata_cor_heat_map")

vertesy/Stringendo documentation built on Nov. 10, 2024, 4:35 a.m.