Codifica come snake case

Codifica l'input con “Codifica come snake case” secondo lo standard corrispondente.

Input: TestoRisultato: Testo

Inserimento di testo

Opzioni

Esempi

Map an API property to a database-column style

Input

createdAt

Expected answer

created_at
Tentativo di essere consapevole del contesto
Off
Separate an acronym from the next word

HTTP is treated as one word.

Input

HTTPResponseCode

Expected answer

http_response_code
Tentativo di essere consapevole del contesto
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.

Input

CO2 concentration ppm

Expected answer

co_2_concentration_ppm
Tentativo di essere consapevole del contesto
Off
Deburr a city name for a plain ASCII identifier

The original diacritics are removed.

Input

São Paulo station

Expected answer

sao_paulo_station
Tentativo di essere consapevole del contesto
Off
Rename bare tokens while retaining a quoted key

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

Input

firstName = "displayName"; maxRetries = 5;

Expected answer

first_name = "displayName"; max_retries = 5;
Tentativo di essere consapevole del contesto
On
To Snake case (dumb)

Input

hello world

Expected answer

hello_world
Tentativo di essere consapevole del contesto
Off
To Snake case (smart)

Input

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");
}
Tentativo di essere consapevole del contesto
On

Parametri

ParametroValore predefinitoInput e opzioni
Tentativo di essere consapevole del contestofalseAttivo o disattivo

Strumenti correlati

Riordino del codice

Riferimento dell’operazione

Vedi la documentazione tecnica originale (English)