轉換為下划線命名

按照相應標准将輸入轉換為下划線命名。

輸入: 文本結果: 文本

文本輸入

工具選項

範例

Map an API property to a database-column style

輸入

createdAt

Expected answer

created_at
尝试感知上下文
Off
Separate an acronym from the next word

HTTP is treated as one word.

輸入

HTTPResponseCode

Expected answer

http_response_code
尝试感知上下文
Off
Normalize a measurement heading containing a number

The digit 2 forms its own word boundary; inspect the exact output before adopting a schema name.

輸入

CO2 concentration ppm

Expected answer

co_2_concentration_ppm
尝试感知上下文
Off
Deburr a city name for a plain ASCII identifier

The original diacritics are removed.

輸入

São Paulo station

Expected answer

sao_paulo_station
尝试感知上下文
Off
Rename bare tokens while retaining a quoted key

Context mode protects double-quoted text; review real code with its parser before applying replacements.

輸入

firstName = "displayName"; maxRetries = 5;

Expected answer

first_name = "displayName"; max_retries = 5;
尝试感知上下文
On
To Snake case (dumb)

輸入

hello world

Expected answer

hello_world
尝试感知上下文
Off
To Snake case (smart)

輸入

test='hello'
echo $test
aSnakeCaseFunction
$aSnakeCaseVariable;
function functionName() {
  console.log('things inside quotes do not get broken');
  console.log("things inside quotes do not get broken");
}

Expected answer

test='hello'
echo $test
a_snake_case_function
$a_snake_case_variable;
function function_name() {
  console.log('things inside quotes do not get broken');
  console.log("things inside quotes do not get broken");
}
尝试感知上下文
On

参數

参數默認值輸入與選項
尝试感知上下文false開啟或关閉

相关工具

程式碼整理

操作参考

查看原始技术文檔 (English)