You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: any_str.go
    path of file: ./repos/plumber/vendor/github.com/json-iterator/go
    
    the code of the file until where you have to start completion: package jsoniter

import (
	"fmt"
	"strconv"
)

type stringAny struc
    
func (any *stringAny) ToFloat64() float64 {
	if len(any.val) == 0 {
		return 0
	}

	// first char invalid
	if any.val[0] != '+' && any.val[0] != '-' && (any.val[0] > '9' || any.val[0] < '0') {
		return 0
	}

	// extract valid num expression from string
	// eg 123true => 123, -12.12xxa => -12.12
	endPos := 1
	for i := 1; i < len(any.val); i++ {
		if any.val[i] == '.' || any.val[i] == 'e' || any.val[i] == 'E' || any.val[i] == '+' || any.val[i] == '-' {
			endPos = i + 1
			continue
		}

		// end position is the first char which is not digit
		if any.val[i] >= '0' && any.val[i] <= '9' {
			endPos = i + 1
		} else {
			endPos = i
			break
		}
	}
	parsed, _ := strconv.ParseFloat(any.val[:endPos], 64)
	return parsed
}