func NewId(id string) (SteamId, error) {
	valid, err := regexp.MatchString(`[U:1:[0-9]+]`, id)
	if err != nil {
		return SteamId(0), err
	}
	if valid {
		id = id[5 : len(id)-1]
		return fromAccountIdStr(id)
	}

	valid, err = regexp.MatchString(`STEAM_[0-5]:[01]:\d+`, id)
	if err != nil {
		return SteamId(0), err
	}
	if valid {
		id = strings.Replace(id, "STEAM_", "", -1) // remove STEAM_
		splitid := strings.Split(id, ":")          // split 0:1:00000000 into 0 1 00000000
		universe, _ := strconv.ParseInt(splitid[0], 10, 32)
		if universe == 0 { //EUniverse_Invalid
			universe = int64(steamlang.EUniverse_Public)
		}
		authServer, _ := strconv.ParseUint(splitid[1], 10, 32)
		accId, _ := strconv.ParseUint(splitid[2], 10, 32)
		accountType := steamlang.EAccountType_Individual
		accountId := (uint32(accId) << 1) | uint32(authServer)
		return NewIdAdv(uint32(accountId), 1, int32(universe), accountType), nil
	}

	valid, err = regexp.MatchString(`^[0-9]{7,9}$`, id)
	if err != nil {
		return SteamId(0), err
	}
	if valid {
		return fromAccountIdStr(id)
	}

	newid, err := strconv.ParseUint(id, 10, 64)
	if err != nil {
		return SteamId(0), err
	}
	return SteamId(newid), nil
}
// NewId attempts to parse the steam ID.

NewId attempts to parse the steam ID.
// NewId attempts to parse the steam ID .
func NewId(id string) (SteamId, error) {
	valid, err := regexp.MatchString(`[U:1:[0-9]+]`, id)
	if err != nil {
		return SteamId(0), err
	}
	if valid {
		id = id[5 : len(id)-1]
		return fromAccountIdStr(id)
	}
	valid, err = regexp.MatchString(`STEAM_[0-5]:[01]:\d+`, id)
	if err != nil {
		return SteamId(0), err
	}
	if valid {
		id = strings.Replace(id, "STEAM_", "", -1) 
		splitid := strings.Split(id, ":")          
		universe, _ := strconv.ParseInt(splitid[0], 10, 32)
		if universe == 0 { 
			universe = int64(steamlang.EUniverse_Public)
		}
		authServer, _ := strconv.ParseUint(splitid[1], 10, 32)
		accId, _ := strconv.ParseUint(splitid[2], 10, 32)
		accountType := steamlang.EAccountType_Individual
		accountId := (uint32(accId) << 1) | uint32(authServer)
		return NewIdAdv(uint32(accountId), 1, int32(universe), accountType), nil
	}
	valid, err = regexp.MatchString(`^[0-9]{7,9}$`, id)
	if err != nil {
		return SteamId(0), err
	}
	if valid {
		return fromAccountIdStr(id)
	}
	newid, err := strconv.ParseUint(id, 10, 64)
	if err != nil {
		return SteamId(0), err
	}
	return SteamId(newid), nil
}
func NewId ( id string ) ( SteamId , error ) { valid , err := regexp . MatchString ( `[U:1:[0-9]+]` , id ) if err != nil { return SteamId ( 0 ) , err } if valid { id = id [ 5 : len ( id ) - 1 ] return fromAccountIdStr ( id ) } valid , err = regexp . MatchString ( `STEAM_[0-5]:[01]:\d+` , id ) if err != nil { return SteamId ( 0 ) , err } if valid { id = strings . Replace ( id , " " , " " , - 1 ) splitid := strings . Split ( id , " " ) universe , _ := strconv . ParseInt ( splitid [ 0 ] , 10 , 32 ) if universe == 0 { universe = int64 ( steamlang . EUniverse_Public ) } authServer , _ := strconv . ParseUint ( splitid [ 1 ] , 10 , 32 ) accId , _ := strconv . ParseUint ( splitid [ 2 ] , 10 , 32 ) accountType := steamlang . EAccountType_Individual accountId := ( uint32 ( accId ) << 1 ) | uint32 ( authServer ) return NewIdAdv ( uint32 ( accountId ) , 1 , int32 ( universe ) , accountType ) , nil } valid , err = regexp . MatchString ( `^[0-9]{7,9}$` , id ) if err != nil { return SteamId ( 0 ) , err } if valid { return fromAccountIdStr ( id ) } newid , err := strconv . ParseUint ( id , 10 , 64 ) if err != nil { return SteamId ( 0 ) , err } return SteamId ( newid ) , nil }
NewId attempts to parse the steam ID.
NewId attempts to parse the steam ID .
// remove STEAM_
 // split 0:1:00000000 into 0 1 00000000
 //EUniverse_Invalid
