ellnix / coctus

0 stars 0 forks source link

Fix uppercase variable casing #12

Closed ellnix closed 4 months ago

ellnix commented 4 months ago

All uppercase variables in codingame irrespective of language case seem to either be touched or untouched.

For instance given:

read UPPERCASE:string(20)

C (snake cased):

    char UPPERCASE[21];
    scanf("%[^\n]", UPPERCASE);

PHP (camel cased):

$UPPERCASE = stream_get_line(STDIN, 20 + 1, "\n");

ruby (snake cased):

uppercase = gets.chomp

rust (snake cased):

    let mut input_line = String::new();
    io::stdin().read_line(&mut input_line).unwrap();
    let uppercase = input_line.trim_matches('\n').to_string();

By default it seems uppercase names stay uppercase unless they have a special significance in the language (like constants in ruby).

ellnix commented 4 months ago

Completed