Skip to main content

create_short_steam_friend_code

Function create_short_steam_friend_code 

Source
pub fn create_short_steam_friend_code(account_id: u32) -> String
Expand description

Create a short friend code from an account ID.

Short friend codes are used in quick invite links (https://s.team/p/{code}/{token}). They encode the account ID’s hex digits using a consonant substitution cipher.

§Example

let code = steam_friend_code::create_short_steam_friend_code(123456789);
assert!(code.contains('-'));