use spaces
This commit is contained in:
parent
4023b68bc9
commit
cfe5f4f789
2 changed files with 5 additions and 13 deletions
10
main.v
10
main.v
|
@ -3,9 +3,9 @@ module main
|
|||
import steamid as s
|
||||
|
||||
fn main() {
|
||||
steamid := s.to_steamid32("STEAM_0:1:37792218")
|
||||
assert steamid == s.SteamID32 { 0, 1, 37792218 }
|
||||
assert steamid.str() == "STEAM_0:1:37792218"
|
||||
assert steamid.to_steamid3() == s.SteamID3 { "U", 1, 75584437 }
|
||||
assert steamid.to_steamid64() == s.SteamID64 { 76561198035850165 }
|
||||
steamid := s.to_steamid32("STEAM_0:1:37792218")
|
||||
assert steamid == s.SteamID32 { 0, 1, 37792218 }
|
||||
assert steamid.str() == "STEAM_0:1:37792218"
|
||||
assert steamid.to_steamid3() == s.SteamID3 { "U", 1, 75584437 }
|
||||
assert steamid.to_steamid64() == s.SteamID64 { 76561198035850165 }
|
||||
}
|
||||
|
|
|
@ -1,13 +1,5 @@
|
|||
module steamid
|
||||
|
||||
pub fn steamid() {
|
||||
steamid := to_steamid32("STEAM_0:1:37792218")
|
||||
assert steamid == SteamID32 { 0, 1, 37792218 }
|
||||
assert steamid.str() == "STEAM_0:1:37792218"
|
||||
assert steamid.to_steamid3() == SteamID3 { "U", 1, 75584437 }
|
||||
assert steamid.to_steamid64() == SteamID64 { 76561198035850165 }
|
||||
}
|
||||
|
||||
pub fn to_steamid32(s string) SteamID32 {
|
||||
if s.contains("STEAM_") && s.count(":") == 2 {
|
||||
mut s_parts := s.split(":")
|
||||
|
|
Loading…
Reference in a new issue