Function batch_convert

Source
pub fn batch_convert(ifile: &str, ofile: &str, is_constant: bool, silent: bool)
Expand description

Batch convert variable names

This function reads variable name data from the specified input file, converts them to the specified naming convention (camelCase or SCREAMING_SNAKE_CASE), and then writes the converted results to the specified output file.

§Arguments

  • ifile: The path to the input file
  • ofile: The path to the output file
  • is_constant: Whether to convert to SCREAMING_SNAKE_CASE, true to convert to SCREAMING_SNAKE_CASE, false to convert to camelCase
  • silent: Whether to supress output

§Example

untools::batch_convert("input.txt", "output.txt", true, false);