I'm trying to use strutils.removePrefix to remove the first 4 lines from a 
string, but i'm having trouble matching the first four lines. I'm guessing it 
has something to do with the newlines. How am i supposed to make this match? 
thanks.

#my code
    
    
    varChunk = chunk
    prefix = "\n" & stringChunkLineSeq[0] & "\n" & stringChunkLineSeq[1] & "\n"
    echo "--------- start prefix -----------"
    echo prefix
    echo "--------- end prefix -------------"
    echo varChunk.startsWith(prefix)
    varChunk.removePrefix(prefix)
    echo varChunk
    
    
    Run

#my terminal output.
    
    
    --------- start prefix -----------
    
    Content-Disposition: form-data; name="file1"; filename="price_list.txt"
    Content-Type: text/plain
    
    --------- end prefix -------------
    false
    
    Content-Disposition: form-data; name="file1"; filename="price_list.txt"
    Content-Type: text/plain
    
    $25 (5th line of varChunk)
    
    
    Run

Reply via email to