def SVGParseFloat(s, i=0):
    """
    Parse first float value from string

    Returns value as string
    """
    start = i
    n = len(s)
    token = ''
    while i < n and (s[i].isspace() or s[i] == ','):
        i += 1
    if i == n:
        return None, i
    if s[i] == '-':
        token += '-'
        i += 1
    elif s[i] == '+':
        i += 1
    if s[i].isdigit():
        while i < n and s[i].isdigit():
            token += s[i]
            i += 1
    if i < n and s[i] == '.':
        token += '.'
        i += 1
        if s[i].isdigit():
            while i < n and s[i].isdigit():
                token += s[i]
                i += 1
        elif s[i].isspace() or s[i] == ',':
            pass
        else:
            raise Exception('Invalid float value near ' + s[start:start + 10])
    if i < n and (s[i] == 'e' or s[i] == 'E'):
        token += s[i]
        i += 1
        if s[i] == '+' or s[i] == '-':
            token += s[i]
            i += 1
        if s[i].isdigit():
            while i < n and s[i].isdigit():
                token += s[i]
                i += 1
        else:
            raise Exception('Invalid float value near ' + s[start:start + 10])
    return token, i
