将驼峰字符串转换为下划线格式
const result = camelToSnake('camelCaseString')console.log(result) // 输出 "camel_case_string" Copy
const result = camelToSnake('camelCaseString')console.log(result) // 输出 "camel_case_string"
输入字符串
转换后的下划线字符串
将驼峰字符串转换为下划线格式
Example