Skip to main content

validate_player_name

Function validate_player_name 

Source
pub fn validate_player_name(raw: &str) -> Result<String, String>
Expand description

The player-name field’s contract: 1 to 9 ASCII letters. The name travels inside every replay .dat and lands in the game’s high-times table, so it stays as narrow as the game’s own name handling needs. Returns the trimmed name, or the reason an input was refused.