def parsenext(string,delimiter):
    """ Returns all text from the start of the input string up to the 
    occurence of the delimiter."""
    delimlen=len(delimiter)
    i=0
    strlen=len(string)
    while(i<strlen):
        if string[i:i+delimlen]==delimiter:
            break
        i+=1
        
    return string[0:i]